cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Progress function not called during connect

From: Patrick <mccpat_at_gmail.com>
Date: Thu, 24 Jan 2008 19:52:54 -0500

Thanks a lot, I'll try that out tomorrow.

I forgot to mention, this occurs when I'm trying to connect through
FTP. I see that the patch is for http.c; I haven't checked, but the
problem may also exist in other modules of the library.

"curl has different behaviour with and without the --proxytunnel option. Are
you talking about yet another way?"

What I mean is, is it even possible to upload a file via FTP with
libcurl without HTTP tunneling enabled? I never use a proxy, and I'd
just like to know if I should even give my users an option or not.

On 1/24/08, Daniel Stenberg <daniel_at_haxx.se> wrote:
> 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