curl-library
Randomly no response from IIS, but *only* with cURL
Date: Mon, 6 Feb 2012 18:21:58 +0100
When requesting data using POST from a certain server (IIS), then
randomly there is no response, not even after 40 seconds
(CURLOPT_TIMEOUT = 40, CURLOPT_CONNECTTIMEOUT = 40).
This *never* happened to me when doing the same request by using a web
browser (filling out a form and submitting it) or with Firefox's Poster
plugin. Unless when using cURL, the server responds in a couple of
seconds at most.
Any idea what could be the source of the problem? Any debugging
suggestions?
The problem occurs with cURL versions:
* 7.21.6 (Ubuntu 11.10)
* 7.19.7 (Amazon LINUX AMI on EC2)
Example server response header:
HTTP/1.1 200 OK
Date: Mon, 06 Feb 2012 15:27:57 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 4.0.30319
Cache-Control: private, max-age=0
Content-Type: application/json; charset=utf-8
Content-Length: 110471
Log of a request without response (CURLOPT_VERBOSE = 1, anonymized):
Feb 06 17:45:36 Data type: 0
Feb 06 17:45:36 Data (64): Re-using existing connection! (#0) with
host example.com
Feb 06 17:45:36 Data type: 0
Feb 06 17:45:36 Data (61): Connected to example.com (1.2.3.4) port 80 (#0)
Feb 06 17:45:36 Data type: 2
Feb 06 17:45:36 Data (299): POST /XYZ.NET/Search.aspx/GetInfo HTTP/1.1
Host: example.com
Accept: */*
Cookie: ASP.NET_SessionId=fj42wfbhs5si4hlfcs5pc3ve;
SOMETHING=2712629952.50480.0000
Accept-Encoding: deflate,gzip
Content-Type: application/json; charset=utf-8
Content-Length: 123
Feb 06 17:45:36 Data type: 4
Feb 06 17:45:36 Data (269):
{"request":{"x":3,"y":4},"sessionKey":"o4or2764-0s6p-8923-nn98-p4p94p60s9p0"}
Feb 06 17:46:16 Data type: 0
Feb 06 17:46:16 Data (77): Operation timed out after 40042
milliseconds with 0 out of -1 bytes received
Feb 06 17:46:16 Data type: 0
Feb 06 17:46:16 Data (22): Closing connection #0
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-02-06