curl-library
Re: Does libcurl POST to the current location, instead of the set URL?
Date: Thu, 25 Jun 2009 09:11:07 +0200 (CEST)
On Thu, 25 Jun 2009, Matthias B. wrote:
> I get a 302-redirect. May I make a short pseudo-code sketch:
I'd also like to know what libcurl version you're using.
> After the first POST-Execution I get a 302-Redirect. When I now change the
> CURLOPT_POSTFIELDS and execute again, libcurl doesn't post to $posturl (as
> set before) - libcurl posts to the Location to which it was redirected. I
> have to set the CURLOPT_URL after every execution again to the correct,
> original URL.
If you can repeat this with the latest libcurl I'd be happy to see a full C
code showing how to repeat it. I'm quite sure a lot of applications and use
cases depend on the documented way of working and don't see the strange
behavior you describe.
You also seem to be using the PHP/CURL binding which may of course be a reason
for minor differences in behavior.
> That's not a big problem, but it was something which made me wonder, and may
> this behavior should be mentioned in the docs (I couldn't find any notice to
> this behavior)?
The way I read your description it is a bug.
-- / daniel.haxx.seReceived on 2009-06-25