On 06/07/18 08:24, Mark Thomas wrote:

<snip/>

> Agreed. That should be an easy change to make. I'll also review the code
> to see if we use the Vary header anywhere else that needs a similar tweak.

<snip/>

There are a couple of places where we modify the Vary header, both for
compression. The DefaultServlet and CompressionConfig.

My initial thought was to create a utility class to reduce the
duplication (since we'd need a third instance of this code for CORS).
Then I looked at the code more closely. The two implementations we
currently have each handle a slightly different set of edge cases. As I
started to combine the two, I thought of a few more edge cases that
weren't handled by either.

What started of as a simple reduce duplication of a few lines got rather
more complex.

Where I ended up was with a new utility class but one that handles all
the edge cases I can think off as well as tidying up after any
applications that modify the Vary header but don't handle all the edge
cases.

Commits to follow.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to