W3C home > Mailing lists > Public > ietf-http-wg-old@w3.org > January to April 1997

Re: What method for Location?

From: Yuan John Jiang <yjj@mci.net>
Date: Wed, 12 Mar 1997 11:09:18 -0500
Message-Id: <199703121609.LAA00473@cletus.>
Cc: http-wg@cuckoo.hpl.hp.com
To: http-wg@cuckoo.hpl.hp.com
>From: koen@win.tue.nl (Koen Holtman)
>
>>If my client does a "POST URI HTTP/1.1" and the server responds
>>with "Location: NEWURL"
>>What shall my client do next?  Shall I do "POST NEWURL ..."
>>or "GET NEWURL ..."?
>
>That depends on the status code of the response message the Location is in,
>so you have to look at section 10.3 of the spec.  And note the notes in
>there about what some clients actually do.

I looked into that section.  The spec does not explicitly say which method
should be used for the NEWURL.  The notes for 301 and 302 responses,
     Note: When automatically redirecting a POST request after receiving
     a 302 status code, some existing HTTP/1.0 user agents will
     erroneously change it into a GET request.
imply that POST should be used.  But why not say it explicitly?

On the other hand, the 303 response does have the need to redirect
"POST URL" to "GET NEWURL".  A header in the response should be added
to indicate the new method to be used.  If this header is not in the spec,
it should be added.

John

>Aside: I believe that if you just output 
>
>Location: <full URL>
>
>in a CGI script, the server will send a 302 status code.  To get a 303 status
>code, do
>
>Location: <full URL>
>Status: 303 See Other
>
>>John
>
>Koen.
>
>
Received on Wednesday, 12 March 1997 08:11:25 EST

This archive was generated by hypermail pre-2.1.9 : Wednesday, 24 September 2003 06:32:31 EDT