I have a large and deep test and am using jmeter 2.1.3.
I have a default http header manager at the top level and inherited for all the samplers below.
Deep in the test structure i need to make an http request and remove all the headers inherited from the parent manager.
The docs say this is achieved by creating a child manager for this sample and declaring the header with a null value, however this just sends a null value over the air and doesnt strip the header completely from the request.
Any ideas? I really dont want to create a child manager for every sample just to over come this issue as im often tweaking the values to 99% of the samples
Found a cool way to sort it, as i just couldn't get the header manager to do what i think its meant to from the docs. I added a BeanShell PreProcessor to the sampler i didn't want an inherited header to be used at all with the following:
sampler.getHeaderManager().removeHeaderNamed("Authorization");
Adding this as a child will only make the script affect the current sampler and would not impact the default if it was set.
In your header manager at the top level, you could set the values as a variable, then later change that variable in a beanshell script.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With