BasicHttpCache.isIncompleteResponse() returns true incorrectly for
gzipped/deflated responses
---------------------------------------------------------------------------------------------
Key: HTTPCLIENT-1167
URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1167
Project: HttpComponents HttpClient
Issue Type: Bug
Components: Cache
Affects Versions: Snapshot
Reporter: Manish Tripathi
When using CachingHttpClient with ContentEncodingHttpClient, and the compressed
content is larger in size than de-compressed equivalent,
BasicHttpCache.isIncompleteResponse() incorrectly returns true, causing the
CachingHttpClient to return 502 Bad Gateway error.
This happens because BasicHttpCache.isIncompleteResponse() is comparing
Content-Length header value against the *decompressed* actual content length,
whereas it should be comparing agains the *compressed* actual content length.
You can test the case using the following URL:
http://static.ak.fbcdn.net/rsrc.php/v1/yf/r/A4HC_Y75I2u.css
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]