0

I have two request in 1st request is giving me 307 redirect along with location header. I pull Location header from response headers of 1st request and then passed it to second request.

Now 2nd request is giving me 302 every time. I tried to play with follow request / redirect automatically options in 1st and 2nd request. However it didnt help. I checked both requests shows Https, I checked cache manager it is working fine. Played with some settings related to Cache Control still issue is occurring.

2nd request is responsible for generating phpsessionid as 'set-cookie' which will only come when 200 OK will happen.

If anyone has any workaround, please assist. Thanks.

1 Answers1

0

As per HTTP Status 302

The HyperText Transfer Protocol (HTTP) 302 Found redirect status response code indicates that the resource requested has been temporarily moved to the URL given by the Location header. A browser redirects to this page but search engines don't update their links to the resource (in 'SEO-speak', it is said that the 'link-juice' is not sent to the new URL).

so my expectation is that you need to play the same trick as with the 1st request, to wit extract the redirect URL from the Location header and add 3rd HTTP Request sampler to hit that URL

In general a "good" JMeter test should behave exactly like a real browser so you should cross-check JMeter's network footprint with what is in the "network" tab of your browser developer tools and amend JMeter's configuration so it would send exactly the same requests as the browser does.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133