curl-users
RE: POST - Location - GET/POST
Date: Fri, 26 Jan 2001 13:45:10 +0100 (MET)
On Fri, 26 Jan 2001 Nico.Baggus_at_mail.ing.nl wrote:
> Why does it need to become a get anyway. If a POST was intended then it
> should probably be a POST i guess ;-)
Generally speaking, I agree with you. It just turned out that people often
"emulated" a browser a little too much and thus they POSTed to a URL that
then used Location: to present an informational page about the just posted
data. I got several "bug reports" about this behaviour.
Since I switched POST=>GET in succeeding request, no one has had any
problems. Until now...
> one way is to keep on posting until an errorcondition is met and then
> maybe backtrack a step and try a get.
I don't think that is the curl style. Curl should behave in a very rational
and controlled manner. It is better to do nothing than to do wrong, I think.
> The other way would be to leave curl on Location: with a special exit
> status and let the calling procedure decide how to continue. Then the
> only question is how to pass the location: from one call to another. (a
> bunch of extra options is then needed)
That option is always there. They can POST *without* -L and just extract the
Location: header "manually", then do a second post to the URL mention there.
Thanks for telling your opinion.
-- Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/Received on 2001-01-26