2010/3/2 <[email protected]>:
> Author: markt
> Date: Tue Mar 2 16:02:25 2010
> New Revision: 918093
>
> URL: http://svn.apache.org/viewvc?rev=918093&view=rev
> Log:
> Better fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=48660
> As per Konstantin's comments, ensure a single Vary header is used and take
> account of * if present
>
> Modified:
> tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
> tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
> tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
>
> + MessageBytes vary = headers.getValue("Vary");
> + if (vary == null) {
> + // Add a new Vary header
> + headers.setValue("Vary").setString("Accept-Encoding");
> + } else if (vary.equals("*")) {
The above is MessageBytes.equals(String). I am sure that it won't work
as expected.
> + // No action required
> + } else {
> + // Merge into current header
> + headers.setValue("Vary").setString(
> + vary.getString() + ",Accept-Encoding");
> + }
> }
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]