Bug 58881 - HTTP Request : HTTPHC4Impl shows exception when server uses "deflate" compression
Summary: HTTP Request : HTTPHC4Impl shows exception when server uses "deflate" compre...
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.13
Hardware: All All
: P2 major (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on: 57319
Blocks:
  Show dependency tree
 
Reported: 2016-01-18 05:20 UTC by Eagle Liu
Modified: 2016-02-26 22:47 UTC (History)
1 user (show)



Attachments
Test plan reproducing issue (8.98 KB, application/xml)
2016-02-19 23:51 UTC, Philippe Mouawad
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eagle Liu 2016-01-18 05:20:51 UTC
steps:
1. Add a new HTTP sampler[using HttpClient4] for test server.[the server only use deflate compress]
2. Add HTTP Header with Accept-Encoding = gzip, deflate, sdch
3. Run test with one thread.

Expect Results:
JMeter could get response data in view results tree listener.
The content should be readable.

Current Result:
In View Results Tree panel, I got following message in Response data tab.
[HttpClient3 and JAVA client could show compressed data.]


java.util.zip.ZipException: invalid stored block lengths
	at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:164)
	at java.io.FilterInputStream.read(FilterInputStream.java:107)
	at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:155)
	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.readResponse(HTTPSamplerBase.java:1915)
	at org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl.readResponse(HTTPAbstractImpl.java:433)
	at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:352)
	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1313)
	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1302)
	at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:483)
	at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:310)
	at java.lang.Thread.run(Thread.java:745)
Comment 1 Philippe Mouawad 2016-02-07 17:23:49 UTC
Hi,
Can you show request and response headers ?
Can you show the raw response you get with Java and HttpHC3Impl?

Thanks
Comment 2 Eagle Liu 2016-02-09 06:10:11 UTC
Plesae refere the bug https://issues.apache.org/jira/browse/HTTPCLIENT-1550
Comment 3 Philippe Mouawad 2016-02-19 23:45:27 UTC
This issue will be fixed by 4.5.2 release.
Comment 4 Philippe Mouawad 2016-02-19 23:51:12 UTC
Created attachment 33574 [details]
Test plan reproducing issue

Note I don't reproduce issue with Tomcat 8 with compression="on".
So I am again using an external link.
Comment 5 Philippe Mouawad 2016-02-26 22:47:08 UTC
Author: pmouawad
Date: Fri Feb 26 22:35:18 2016
New Revision: 1732569

URL: http://svn.apache.org/viewvc?rev=1732569&view=rev
Log:
Upgrade to HttpClient/httpmime 4.5.2 which fixes at the same time:
- Bug 58881 - HTTP Request : HTTPHC4Impl shows exception when server uses "deflate" compression
- Bug 58583 - HTTP client fails to close connection if server misbehaves by not sending "connection: close", violating HTTP RFC 2616 / RFC 7230
- Bug 56358 - Cookie manager supports cross port cookies and RFC6265
- Bug 57319 - Upgrade to HttpClient 4.5.2
Bugzilla Id: 57319

Modified:
    jmeter/trunk/build.properties
    jmeter/trunk/eclipse.classpath
    jmeter/trunk/lib/   (props changed)
    jmeter/trunk/lib/aareadme.txt
    jmeter/trunk/licenses/bin/README.txt
    jmeter/trunk/res/maven/ApacheJMeter_parent.pom
    jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCookieManager.java
    jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java
    jmeter/trunk/xdocs/changes.xml