cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Progress function not called during connect

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 25 Jan 2008 00:00:28 +0100 (CET)

On Thu, 24 Jan 2008, Patrick wrote:

> libcurl-7.17.1 doesn't seem to be calling my progress function callback
> while it's trying to connect.
>
> I set it up to connect to tor through HTTP-type proxy; when HTTP tunneling
> is enabled, the connect never succeeds, I never get an error message, and my
> progress function is never called. It just hangs.

Reading the code, I can't but to agree with you...

How about this little patch:

RCS file: /cvsroot/curl/curl/lib/http.c,v
retrieving revision 1.358
diff -u -r1.358 http.c
--- lib/http.c 23 Jan 2008 22:22:12 -0000 1.358
+++ lib/http.c 24 Jan 2008 22:58:17 -0000
@@ -1590,6 +1590,8 @@
            }
            break;
          } /* switch */
+ if(Curl_pgrsUpdate(conn))
+ return CURLE_ABORTED_BY_CALLBACK;
        } /* while there's buffer left and loop is requested */

        if(error)

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