Bug 51775

Summary: Port number duplicates in Host header when capturing by HttpClient (3.1 and 4.x)
Product: JMeter - Now in Github Reporter: Tetsuya Takatsuru <takatsuru.tetsuya>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: major    
Priority: P2    
Version: 2.5   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: patch fixes this bug instantly.

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
Comment 3 The ASF infrastructure team 2022-09-24 20:37:46 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2525