You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jakarta.apache.org by bu...@apache.org on 2011/05/21 03:05:30 UTC
DO NOT REPLY [Bug 51238] New: Allow overriding Host and other
restricted headers
https://issues.apache.org/bugzilla/show_bug.cgi?id=51238
Bug #: 51238
Summary: Allow overriding Host and other restricted headers
Product: JMeter
Version: 2.4
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: HTTP
AssignedTo: notifications@jakarta.apache.org
ReportedBy: haridara@gmail.com
Classification: Unclassified
Currently the if you add the "Host" header to the "HTTP Header Manager", it
gets silently dropped by the underlying java HTTP stack, because this is
considered one of the restricted headers. However, the behavior can be changed
by simply setting the system property named
"sun.net.http.allowRestrictedHeaders" to "true". I have verified that by
passing -Dsun.net.http.allowRestrictedHeaders=true argument on the
command-line, the "Host" header does indeed work.
Since this header is essential in testing the virtualhost functionality
(without having to resort to editing hosts file on each of the load m/c, or
depending on the network configuration), I request that JMeter set this
property by default during the startup and allow overriding the Host header.
Some research is required on what other restricted headers exist and what the
consequence might be, but since we are in the business of testing HTTP, I can't
imagine any harm of allowing any and all.
The workaround of passing this property on the command-line is not very
flexible since it would involve changing any existing scripts that auto-start
jmeter. I have looked at an alternative to programmatically change this
property during the test run by calling __setProperty() in the context of a
user defined variable, but that didn't help. If there is another location where
changing this property could get it working, it could be considered an adequate
workaround, and should be documented.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 51238] Allow overriding Host and other restricted
headers
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51238
--- Comment #2 from Hari Krishna Dara <ha...@gmail.com> 2011-05-21 16:52:23 UTC ---
Thanks for the clarification on the bin/system.properties, this is probably a
good workaround. Is there a plan to switch to the Apache HttpClient for a
future release?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 51238] Allow overriding Host and other restricted
headers
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51238
--- Comment #1 from Sebb <se...@apache.org> 2011-05-21 09:08:11 UTC ---
Thanks for the information - useful to know why the header was being ignored.
System properties can be defined in the file "bin/system.properties" which is
processed at startup, so should apply to the HTTP implementation.
No code change needed; just edit the file.
I'm not convinced that this should be the default.
Note that the Java HTTP implementation has other failings; in general the
Apache HttpClient implementation (3.1 currently, will also support 4.x in the
next release) is much more flexible.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 51238] Allow overriding Host and other restricted
headers
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51238
Sebb <se...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #3 from Sebb <se...@apache.org> 2011-05-22 12:06:57 UTC ---
On further reflection, I think the setting
-Dsun.net.http.allowRestrictedHeaders=true
should be the default for JMeter. JMeter should be able to set such properties.
URL: http://svn.apache.org/viewvc?rev=1125933&view=rev
Log:
Define sun.net.http.allowRestrictedHeaders=true by default. This fixes Bug
51238.
Modified:
jakarta/jmeter/trunk/bin/system.properties
jakarta/jmeter/trunk/xdocs/changes.xml
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 51238] Allow overriding Host and other restricted
headers
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51238
--- Comment #4 from Hari Krishna Dara <ha...@gmail.com> 2011-05-23 05:57:16 UTC ---
Thank you.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org