09-19-2011 09:05 AM
Hi all, and Stingray Team,
I'm facing a problem where a request arrives in Stingray with HTTP protocol, and is redirected via a rule to HTTPS.
Currently the redirection is done through http.redirect.
This causes a major problem, as the original request is actually a POST, with POST data, and is redirected as a raw GET. All the data is lost.
My question is: is there a way to "redirect" some HTTP request to HTTPS, but keeping their method and data ?
Seems http.redirect or http.changeSite do not allow POST redirection, and http.request.post seems not made to send post request to the website, but is meant for zeus internal work (ie. post request, retrieve result & body, and continue script based on the result).
I would appreciate very much any input on this subject.
Thanks a lot !
Solved! Go to Solution.
10-24-2011 01:37 PM
The http.redirect function sends back a '302 Moved Temporarily' response with a Location header containing the new URL.
The HTTP 1.1 spec suggests that clients should resend POST data after prompting the user, but acknowledges that some clients do not (they send GET requests instead):
This is a client issue, not a server one, and seems to be very common (as you have found).
A couple of comments: