On Wed, 17 Apr 2002 15:52:13 +0900
Tatsuhiko Miyagawa <[EMAIL PROTECTED]> wrote:
: At Wed, 17 Apr 2002 08:06:56 +0200,
: F. Xavier Noria <[EMAIL PROTECTED]> wrote:
:
: > You have to say following POST redirections is OK with you:
: >
: > push @{ $ua->requests_redirectable }, 'POST';
: >
: > (from perldoc LWP::UserAgent). This is so, I guess, becacuse the RFC
: > says POST redirections must not be followed by user agents unless the
: > user says so explicitly.
:
: Yes. But even if you add the statement above in your client code, it
: might not work the same as "standard" browsers. They (= IE, NN and
: many others) follow POST redirects as GET.
Maybe, but it would be worth noting that LWP::UserAgent follows what the
RFCs say, namely, that the client is not allowed to change that POST if
it is following a redirection from a 302 code:
If the 302 status code is received in response to a request other
than GET or HEAD, the user agent MUST NOT automatically redirect the
request unless it can be confirmed by the user, since this might
change the conditions under which the request was issued.
Note: RFC 1945 and RFC 2068 specify that the client is not allowed
to change the method on the redirected request. However, most
existing user agent implementations treat 302 as if it were a 303
response, performing a GET on the Location field-value regardless
of the original request method. The status codes 303 and 307 have
been added for servers that wish to make unambiguously clear which
kind of reaction is expected of the client.
-- fxn