springuser2014 / wro4j

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

Gzipping resources doesn't not work on server enforcing response.setContentLength #173

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Setting gzipResources to true 
2. Running your application in weblogic server 10
3. Css files are blank

What is the expected output? What do you see instead?
I expect to see one big merged css file with gzip compression on it. The result 
is a blank css file.

What version of the product are you using? On what operating system?
wro version number is: 1.3.4

Please provide any additional information below.

In the class ro.isdc.wro.manager.WroManager line nr: 218 the content length is 
set to the length of the merged css files without compression. 

response.setContentLength(contentHashEntry.getContent().length());

When the file is streamed to the client it get's gzipped with the method: 
getGzipedOutputStream in WroManager but the contentLength isn't updated to 
reflect the new length of the gzipped output. Weblogic server enforces the 
content length en throws the following exception:

java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '11654' 
bytes instead of stated: '64587' bytes.

The problem is probably not restricted to weblogic.

Original issue reported on code.google.com by eli.will...@gmail.com on 25 Feb 2011 at 9:24

GoogleCodeExporter commented 9 years ago
Fixed for 1.3.5

Original comment by alex.obj...@gmail.com on 25 Feb 2011 at 9:58

GoogleCodeExporter commented 9 years ago
Issue 171 has been merged into this issue.

Original comment by alex.obj...@gmail.com on 25 Feb 2011 at 9:58

GoogleCodeExporter commented 9 years ago

Original comment by alex.obj...@gmail.com on 25 Feb 2011 at 9:59