I am load-testing a page that has embedded resources. The test needs to load the page and its embedded resources. The page request needs to specify an HTTP header: a Host header, e.g. Host: abc. The embedded resources are in a different domain from my page, e.g. http://code.jquery.com/jquery.min.js
My JMeter plan has an HTTP Request sampler, which has a child HTTP Header Manager element that specifies the Host header. I'm using the "Retrieve All Embedded Resources" option on the HTTP Request.
The initial page request works as it should, but all the subsequent requests -- the ones to fetch the embedded resources -- fail with a 404. If I disable the HTTP Header Manager (i.e. if I don't send the Host header), the embedded resource requests work. Unfortunately, the test is invalid without that Host header.
So here's the question: is there a way to tell JMeter to use a header on the page request but not on the requests for the page's embedded resources?
I've looked through the JMeter docs, and I've tried Googling for "jmeter request header first request only".
I'm using JMeter 2.11 with the HttpClient4 HTTP Request implementation. The HttpClient3.1 and Java implementations behave similarly.