I needed to override Host header and debugged a little to find that this
header is being considered as one of the "restricted" headers and so is
being silently dropped. The workaround is to set
"sun.net.http.allowRestrictedHeaders" to "true". I was able to verify that
this works by passing in -Dsun.net.http.allowRestrictedHeaders=true 
argument on the command-line. When I tried to set the same property in the
context of a User Defined Variable using __setProperty() function, I could
see that the property value has changed, but the Host header was still
dropped, suggesting that the property value needs to be changed sooner than
that. I am not sure if there is another context that can make it possible to
programmatically change this value.

I went ahead and opened this enhancement request:
https://issues.apache.org/bugzilla/show_bug.cgi?id=51238

--
View this message in context: 
http://jmeter.512774.n5.nabble.com/How-to-override-Host-header-tp4295391p4413871.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org

Reply via email to