cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_easy_perform hangs on 7.9.8

From: Cyrill Osterwalder <cyrill.osterwalder_at_seclutions.com>
Date: Fri, 30 May 2003 10:32:30 +0200

I also experience curl_easy_perform of libcurl (7.10.3) hanging in the
select/poll every now and then but I do not know exactly yet for which kind
of requests/responses it happens. Apache server sits in read and waits and
libcurl sits in select/poll, both on the same socket. Deadlock. The Web
server works fine for other clients.

If I don't reuse the curl handle it does not seem to happen. However, I
cannot benefit from the SSL session resumes if I create the curl handle
from scratch every time. Reusing the curl handle seems to cause the trouble
even if FORBID_REUSE and FRESH_CONNECTION is set.

I'll investigate further and hope to give more details soon. Maybe some of
you can reproduce it already?

Regards,

Cyrill

--On Mittwoch, 28. Mai 2003 14:41 -0400 RBramante_at_on.com wrote:

> I just hit this weird condition with 7.9.8. I haven't tried it with the
> latest yet, and it's not clear to me if the problem is curl vs. with the
> server response header. Any thoughts?
>
> Basically, I've started to hit a scenario where curl hangs until its IO
> timeout if the server responds with something like the following:
>
> HTTP/1.1 400 Bad Request
> Content-Type: text/html
> Date: Wed, 28 May 2003 18:37:02 GMT
> Connection: close
> Server: Apache Tomcat/4.0.3 (HTTP/1.1 Connector)
>
> eventually perform will return 28 "Operation timed out with 0 out of -1
> bytes received"
>
> My guess is that because the response header has no content-length (or
> specifiy chunked encoding) and has no data that the read loop which must
> get initialized to -1 does not know to quit until it timesout. However,
> the header does have "Connection: close" set, and I see that in the header
> parsing curl sets a bit to signify this so perhaps the fix is to have the
> read loop check for this as well. (Or maybe just reset the expected
> length to 0 if we've parsed the whole header and not found a
> Content-Length)
>
> I'll try to pull the latest from CVS tomorrow and test it if necessary.
>
>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: eBay
> Get office equipment for less on eBay!
> http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5

-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
Received on 2003-05-30