curl-library
curl_easy_perform hangs on 7.9.8
Date: Wed, 28 May 2003 14:41:46 -0400
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
Received on 2003-05-28