curl-users
Curl re-uses old POST data in GET requests on same handle (7.12.3)
Date: Tue, 11 Jan 2005 14:09:32 +0100
Hi again
There is a new behavior in curl 7.12.3 that I just recognized. If operating
with the same curl handle it seems that with the new version 7.12.3 curl
re-uses data from a previous POST request again in a new request even if the
new one is a GET request. That seems to happen whenever the handle deals
with a POST request. It even re-uses the old content length which results in
erroneous behaviour in most cases (GET request with content length makes
server wait for data that is not coming).
Is this new behaviour intended and do I have to reset POST relevant fields
manually on the handle before reusing it or is it a bug?
To make my application work again with 7.12.3 I need to manually reset the
following options. Otherwise curl wrongly re-uses old POST data in new GET
requests on the same handle. In 7.12.2 it was enough to tell curl that it is
now a GET request. Maybe there is other data that sticks to the handle but
that I haven't identified yet.
- CURLOPT_HTTPPOST
- CURLOPT_POSTFIELDS
- CURLOPT_POSTFIELDSIZE
- HTTP Header "Content-Length:"
- CURLOPT_CUSTOMREQUEST (to override POST method)
Best regards,
Cyrill
Received on 2005-01-11