ASF Bugzilla – Attachment 18424 Details for
Bug 39402
enabling gzip negotiation overwrites existing "vary:" headers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
A patch that fixes the overwriting vary header bug
GzipCompressionVaryHeaderPatch.txt (text/plain), 1.41 KB, created by
Matthew Cooke
on 2006-06-07 17:19:32 UTC
(
hide
)
Description:
A patch that fixes the overwriting vary header bug
Filename:
MIME Type:
Creator:
Matthew Cooke
Created:
2006-06-07 17:19:32 UTC
Size:
1.41 KB
patch
obsolete
>Index: /home/dev/workspace/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java >=================================================================== >--- /home/dev/workspace/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java (revision 412449) >+++ /home/dev/workspace/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java (working copy) >@@ -1613,8 +1613,20 @@ > if (useCompression) { > outputBuffer.addActiveFilter(outputFilters[Constants.GZIP_FILTER]); > headers.setValue("Content-Encoding").setString("gzip"); >- // Make Proxies happy via Vary (from mod_deflate) >- headers.setValue("Vary").setString("Accept-Encoding"); >+ >+ // Either add a "Vary: Accept-Encoding" header or add Accept-Encoding to >+ // the existing header. >+ String varyHeaderValue = ""; >+ MessageBytes varyHeaderValueBytes = headers.getValue("Vary"); >+ if (varyHeaderValueBytes!=null && varyHeaderValueBytes.getString()!=null) { >+ varyHeaderValue = varyHeaderValueBytes.getString(); >+ } >+ if ("".equals(varyHeaderValue)) { >+ varyHeaderValue="Accept-Encoding"; >+ } else { >+ varyHeaderValue=varyHeaderValue+","+"Accept-Encoding"; >+ } >+ headers.setValue("Vary").setString(varyHeaderValue); > } > > // Add date header
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 39402
: 18424