curl-library
Re: libCurl 7.18.1: Maybe busy waiting during creation of tunnel through proxy for SSL data ?
Date: Fri, 09 May 2008 19:18:42 +0200
Daniel Stenberg wrote:
> I think the problem is that the code is simply waiting for the socket
> to become writeable (as you saw), while in reality it should wait for
> it to become readable after it has sent its CONNECT request.
>
> My (untested) attempt at fixing this follows:
>
> diff -u -r1.168 multi.c
> --- lib/multi.c 30 Apr 2008 21:20:09 -0000 1.168
> +++ lib/multi.c 6 May 2008 21:33:40 -0000
> @@ -725,6 +725,12 @@
> return GETSOCK_BLANK;
>
> sock[0] = conn->sock[FIRSTSOCKET];
> +
> + /* when we've sent a CONNECT to a proxy, we should rather wait for the
> + socket to become readable to be able to get the response headers */
> + if(conn->bits.tunnel_connecting)
> + return GETSOCK_READSOCK(0);
> +
> return GETSOCK_WRITESOCK(0);
> }
>
>
Hi Daniel,
I tested your bugfix under Windows 2000 and QNX 6.3.2. It works well and
prevents the busy waiting on the socket.
Do you apply that fix in CVS, so that it is contained in the next
official release ?
Best regards,
Stefan
Received on 2008-05-09