cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Re: Re: FTP CURLOPT_POSTQUOTE with CURLOPT_NOBODY bug ?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 24 Jan 2006 15:49:17 +0100 (CET)

On Tue, 24 Jan 2006, Philippe Vaucher wrote:

> I'm not paid. We are on a big open source project where we use curl

Sorry. I'm just to unused to someone speaking of deadlines in open source
projects! ;-)

> So the problem seems tied to CURLOPT_POSTQUOTE.

I believe the problem is connected to the fact that the re-use of the
connection fails, and libcurl makes a new connection (and then calls
Curl_follow() in which this false error is detected). In fact, I would like
you to try this patch:

diff -u -r1.290 transfer.c
--- lib/transfer.c 24 Nov 2005 10:22:47 -0000 1.290
+++ lib/transfer.c 24 Jan 2006 14:48:32 -0000
@@ -1765,17 +1765,18 @@
    size_t newlen;
    char *newest;

- if ((data->set.maxredirs != -1) &&
- (data->set.followlocation >= data->set.maxredirs)) {
- failf(data,"Maximum (%d) redirects followed", data->set.maxredirs);
- return CURLE_TOO_MANY_REDIRECTS;
- }
+ if(!retry) {
+ if ((data->set.maxredirs != -1) &&
+ (data->set.followlocation >= data->set.maxredirs)) {
+ failf(data,"Maximum (%d) redirects followed", data->set.maxredirs);
+ return CURLE_TOO_MANY_REDIRECTS;
+ }

- if(!retry)
      /* mark the next request as a followed location: */
      data->state.this_is_a_follow = TRUE;

- data->set.followlocation++; /* count location-followers */
+ data->set.followlocation++; /* count location-followers */
+ }

    if(data->set.http_auto_referer) {
      /* We are asked to automatically set the previous URL as the

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-01-24