prabhuish / webutilities

Automatically exported from code.google.com/p/webutilities
0 stars 0 forks source link

Add option to disable "compressedContentEncoding" Etag append in CompressionFilter #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In CompressedHttpServletResponseWrapper.java setETagHeader(), webutilities 
currently appends "gzip" if the response is compressed, I'd like an option to 
either disable the "-"+compressedContentEncoding append, or strip it off in the 
RequestWrapper before handing off to the servlet. 

When we serve resources via the Tomcat default servlet instead of the 
MergeServlet, but still compress them with the filter, the servlet doesn't 
recognize the Etag so a 304 not modified header is never sent.

I currently just modified the method to never append -gzip... I agree it may 
feel a little dirty because the response isn't technically the same as the 
original etag, but since it's just compression, it seems like a workable 
solution.

Original issue reported on code.google.com by inta...@gmail.com on 20 Aug 2014 at 9:27

GoogleCodeExporter commented 9 years ago
Let me look at it

Original comment by rr.patil...@gmail.com on 25 Aug 2014 at 10:33

GoogleCodeExporter commented 9 years ago

Original comment by rr.patil...@gmail.com on 25 Aug 2014 at 10:34

GoogleCodeExporter commented 9 years ago
https://github.com/rpatil26/webutilities/commit/786f283bc2a194d35dd2bbab601931ec
e266a335

Original comment by rr.patil...@gmail.com on 4 Aug 2015 at 10:40