|
Posted by John Dunlop on 09/30/05 22:53
Joseph S. wrote:
> header("Location: http://www.{$_POST['domain']}");
In the absence of a different status code, that will send a 302 (temporary
redirect). But the HTTP1.1 spec warns that some browsers treat 302
responses as if they were 303s, meaning that they issue a GET request no
matter what the first method was, be it HEAD, POST, whatever. Any
information POSTed the first time around wouldn't be sent again.
Your solution suggests that not all browsers treat 302s like that, that
some stick with POST.
To disambiguate this, in theory at least, HTTP1.1 provides the 303 and 307
status codes. 303 is for when user agents should perform a GET on the
Location URI, 307 for when they should continue using the same method as
before (possibly involving user interaction). Some browsers don't grok
these though. More details at
http://www.ietf.org/rfc/rfc2616
--
Jock
Navigation:
[Reply to this message]
|