You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tetsuya Takatsuru (Bug 51775):
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)
# HG changeset patch# User Tetsuya Takatsuru <takatsuru.tetsuya@nttcom.co.jp># Date 1315359482 -32400# Branch trunk# Node ID 9ff7f2c2a4cd0882ee77ca3aa2d32307cbbf53bb# Parent 91e893dec97660f5b48bc7cb58a5a967b0af9021
port duplicates at Host header when capturing by proxy.
diff -r 91e893dec976 -r 9ff7f2c2a4cd src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java--- a/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java 木 8月 18 15:40:00 2011 +0900+++ b/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java 水 9月 07 10:38:02 2011 +0900@@ -630,6 +630,7 @@
if (! HEADER_CONTENT_LENGTH.equalsIgnoreCase(n)){
String v = header.getValue();
if (HEADER_HOST.equalsIgnoreCase(n)) {
+ String host = v.split(":", 2)[0];
// TODO is it a bug that HC 4.x does not add the correct port to the generated Host header?
int port = url.getPort();
if (port != -1) {
@@ -637,7 +638,7 @@
port = -1; // no need to specify the port if it is the default
}
}
- request.getParams().setParameter(ClientPNames.VIRTUAL_HOST, new HttpHost(v, port));+ request.getParams().setParameter(ClientPNames.VIRTUAL_HOST, new HttpHost(host, port));
} else {
request.addHeader(n, v);
}
Severity: major
OS: All
The text was updated successfully, but these errors were encountered:
@milamberspace (migrated from Bugzilla):
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.
Tetsuya Takatsuru (Bug 51775):
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)
Created attachment JMeter_hc4impl_bug.patch: patch fixes this bug instantly.
JMeter_hc4impl_bug.patch
Severity: major
OS: All
The text was updated successfully, but these errors were encountered: