Regarding "Content-Encoding: gzip" header without gzip content!



I have a question regarding gzip in http.

Suppose the server adds the “Content-Encoding: gzip” header.
But, the actual content is not gzipped (assuming the compression failed and it is sending the data without compression).

What will be the impact of this?
How will http clients (especially browsers) handle this?



Have you seen this to be the case? Browsers will likely handle this condition fine, they tend to be liberally lenient.


Twitter API always reply gzip contents. Maybe many twitter client which not use browser doesn’t work. And twitter API doesn’t return text content even though sending Accept-Encoding: identity.