You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Internet is really unhelpful dealing with this situation!
First, it's straightforward to make sure that gzflush() isn't called if no data was written, but zero-length content with gzip compression is technically invalid gzip, so empty content would be an error in this case. However, according to this thread, it might be technically correct after all...?
Meanwhile, you can force the issue with khttp_body_compress(0) with your 304s, which will disable compression for the call and have a zero-length body unless you, you know, wrote some data.
Seems like the best thing to do is to see what big servers are doing in this case (asking for compression and a 304). Do they 304 with gzip and zero content? Do they 304 without gzip?
304 responses should not have a body. However, when kcgi enables gzip, it compresses the empty body and responds with a 14 byte gzip header.
Probably shouldn't compress empty body regardless of response code.
The text was updated successfully, but these errors were encountered: