Bug 51775 - Port number duplicates in Host header when capturing by HttpClient (3.1 and 4.x)
Port number duplicates in Host header when capturing by HttpClient (3.1 and 4.x)
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: HTTP
2.5
All All
: P2 major (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2011-09-07 02:43 UTC by Tetsuya Takatsuru
Modified: 2011-09-14 22:05 UTC (History)
0 users



Attachments
patch fixes this bug instantly. (1.61 KB, application/octet-stream)
2011-09-07 02:43 UTC, Tetsuya Takatsuru
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tetsuya Takatsuru 2011-09-07 02:43:52 UTC
Created attachment 27463 [details]
patch fixes this bug instantly.

When I'm capturing by HTTP proxy (implementation is set as HttpClient4),
port number duplicates in Host header as following:

GET /somepath HTTP/1.1
Host: somehost:8080:8080

this occurs only when I use non-default port number like as 8080.

To fix this bug, suppress Host header's port number on making HTTP request.
(patch here as attachment)
Comment 1 Milamber 2011-09-14 16:17:15 UTC
Thanks for report and proposal patch. 
This bug impacting the HC4 and HC3 implementations when we are in JMeter Proxy mode.
I've fixed this bug for all HC implementation.


URL: http://svn.apache.org/viewvc?rev=1170701&view=rev
Log:
Bug 51775 - Port number duplicates in Host header when capturing by HttpClient (3.1 and 4.x)

Modified:
    jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java
    jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
    jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHCAbstractImpl.java
    jakarta/jmeter/trunk/xdocs/changes.xml
Comment 2 Milamber 2011-09-14 22:05:28 UTC
Repatch.

URL: http://svn.apache.org/viewvc?rev=1170866&view=rev
Log:
Bug 51775 - Port number duplicates in Host header when capturing by HttpClient (3.1 and 4.x)
Simplify and improve last fix. Thanks sebb.

Modified:
    jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java
    jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
    jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHCAbstractImpl.java