How to keep request header during redirect scenario?
I have below sites, and when access to site1 it will redirect to site2:
(Note: below sites are all fake and just showed as a demo)
site1: http://www.test.com/test?a=1
site2: http://www.test.com/test?a=1&_z=_
Tried with Fiddler (site1 and site2 has the same request header during redirect action, which is expected result):
GET http://www.test.com/test?a=1
User-Agent: Fiddler
Purpose: prefetch
Host: www.test.com
GET http://www.test.com/test?a=1&_z=_
User-Agent: Fiddler
Purpose: prefetch
Host: www.test.com
But when I tried it with Soapui Pro, it shows as below:
GET http://www.test.com/test?a=1
User-Agent: Fiddler
Purpose: prefetch
Host: www.test.com
GET http://www.test.com/test?a=1&_z=_
User-Agent: Fiddler
Host: www.test.com
As you can see, the header "Purpose: prefetch" is gone after the redirect action, which is not expect result. How to handle this and make it works just like Fiddler did?
Besides, this issue also happened with Useragent setting, if you setting your custom useragent with "Preferences -> HTTP Setting -> User-Agent Header", it's only works with the first request url, the redirect sites always used the default useragent value ("User-Agent: Apache-HttpClient/4.1.1 (java 1.5)")
I already blocked with this issue, please help to have a look, thanks.
And there's another related issue here: https://community.smartbear.com/t5/SoapUI-Open-Source/Wrong-redirect-in-HTTP-request-with-several-following-redirects/td-p/109555