You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparkjava
First off, love sparkJava! I love anything that works as well as this does and allows me to build things easily and quickly.
But for gzip/http compression, well, the docs on this are very simple: just turn on the response header and off you go.
I do this and sure enough, see the response header being set to gzip and then .... the browser gives me the dreaded "net::ERR_CONTENT_DECODING_FAILED".
I've set up the system to only compress css files (because nothing was working and it was hard to even see what was going on).
The obvious thing to note is that the Content-Length is the SAME before and after. Now on systems I've worked on (apache) you usually set a minimum length for compression (as compressing small files is actually slower due to the time to run the compression versus the savings of transferring 100 v. 60 bytes or whatever).
Now, I'm a little confused about the RFC on this point: is the content-length supposed to reflect the compressed size or the uncompressed size WHEN gzip is on?
Here are the headers I'm seeing in chrome BEFORE turning gzip on: