Summary: | Allow sending HTTP requests without a default User-Agent header | ||
---|---|---|---|
Product: | JMeter | Reporter: | Antony Bowesman <antony.bowesman> |
Component: | HTTP | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | antony.bowesman, michaelo, p.mouawad |
Priority: | P3 | Keywords: | FixedInTrunk |
Version: | 5.0 | ||
Target Milestone: | JMETER_5.1.1 | ||
Hardware: | All | ||
OS: | All | ||
URL: | https://issues.apache.org/jira/browse/HTTPCLIENT-1952 |
Description
Antony Bowesman
2018-12-04 06:26:44 UTC
This header is by default added from our Apache HttpClient. I checked the source code, there is currently no way of disabling this. Even if you invoke HttpClentBuilder#setUserAgent(null), it'd overridden with the default one. The only workaround I see is to call HttpClentBuilder#addInterceptorLast(HttpRequestInterceptor) which would remove this header actively. This could be done from JMeter with a JMeter property. I'd prefer a reasonable solution in HttpClient directly, e.g., HttpClentBuilder#disableDefaultUserAgent(). Please a issue with https://issues.apache.org/jira/browse/HTTPCLIENT. As soon as the upstream ticket is resolved we can introduce a system property to disable this header. Hello, What about considering that empty value for Header means "remove header" ? Regards An empty header is a valid use case. The ABNF in RFC7230 also defines the field value as field-value = *( field-content / obs-fold ) which would indicate that empty values are valid. Issue fixed in httpclient 4.5.7 (In reply to Philippe Mouawad from comment #6) > Issue fixed in httpclient 4.5.7 Boy, you are fast. You must have been lurking for my merge ;-) (In reply to Michael Osipov from comment #7) > (In reply to Philippe Mouawad from comment #6) > > Issue fixed in httpclient 4.5.7 > > Boy, you are fast. You must have been lurking for my merge ;-) Hello Michael, They call me Lucky Luke, the man who comments before his shadow :-) On an another topic, the 4.5.7 would not be released before Q1, we'll probably be releasing a JMeter 5.1 before without any possibility to fix this issue. Regards (In reply to Philippe Mouawad from comment #8) > (In reply to Michael Osipov from comment #7) > > (In reply to Philippe Mouawad from comment #6) > > > Issue fixed in httpclient 4.5.7 > > > > Boy, you are fast. You must have been lurking for my merge ;-) > > Hello Michael, > > They call me Lucky Luke, the man who comments before his shadow :-) > > On an another topic, the 4.5.7 would not be released before Q1, we'll > probably be releasing a JMeter 5.1 before without any possibility to fix > this issue. > > Regards You should kindly request on the dev mailing list release for Jan. I guess neither Oleg noch Gary will mind. This is an important issue. (In reply to Michael Osipov from comment #9) > (In reply to Philippe Mouawad from comment #8) > > (In reply to Michael Osipov from comment #7) > > > (In reply to Philippe Mouawad from comment #6) > > > > Issue fixed in httpclient 4.5.7 > > > > > > Boy, you are fast. You must have been lurking for my merge ;-) > > > > Hello Michael, > > > > They call me Lucky Luke, the man who comments before his shadow :-) > > > > On an another topic, the 4.5.7 would not be released before Q1, we'll > > probably be releasing a JMeter 5.1 before without any possibility to fix > > this issue. > > > > Regards > > You should kindly request on the dev mailing list release for Jan. I guess > neither Oleg noch Gary will mind. This is an important issue. Hello Michael, Already done for another issue . You can have a look at mailing list. Regards Author: pmouawad Date: Sun Mar 3 10:19:20 2019 New Revision: 1854682 URL: http://svn.apache.org/viewvc?rev=1854682&view=rev Log: Bug 62977 - Unable to send HTTP requests without a User-Agent header Bugzilla Id: 62977 Modified: jmeter/trunk/bin/jmeter.properties jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java jmeter/trunk/xdocs/changes.xml jmeter/trunk/xdocs/usermanual/properties_reference.xml |