curl-library
Re: Detect if HTTP request has been reached server or not
Date: Mon, 9 Jul 2012 09:23:09 +0200
Am 05.07.2012 16:05, schrieb Daniel Stenberg:
> On Tue, 3 Jul 2012, Marco Strohner wrote:
>
> Please don't top-post.
>
>> My test scencario for testing that the response is lost:
>>
>> - call curl_easy_perform()
>> - the server reacts on this request (the webview shows the data that
>> I've sent)
>> - disable the network adapter at the client PC (the server doesn't
>> immediately send the repsonse so I have enough time)
>> - curl_easy_perform() returns with CURLE_COULDNT_CONNECT
>
> I have a very hard time to see in the code how this can happen and if it
> truly does as you describe it then it is a bug. Can you show us a
> VERBOSE trace of this?
>
>> Isn't this a correct test secanrio or do you have any suggestions how
>> to test these scenarios?
>
> Test which scenarios?
>
Hello,
here an output with deactivating the network adapter before sending the
request (I've removed the content that should be sent and some previous
messages otherwise the log will be too large):
About to connect() to proxy 192.168.88.189 port 8080 (#0)
Trying 192.168.88.189... connected
Connected to 192.168.88.189 (192.168.88.189) port 8080 (#0)
Establish HTTP proxy tunnel to myhost.com:8445
......
Connection #0 to host 192.168.88.189 left intact
Replaced cookie JSESSIONID="8AF2A8A8926A7B59A74A94748657F713" for domain
myhost.com, path /webapp/, expire 0
Re-using existing connection! (#0) with host 192.168.88.189
Connected to 192.168.88.189 (192.168.88.189) port 8080 (#0)
POST http://myhost.com:8090/webapp HTTP/1.1
Host: myhost.com:8090
Accept: */*
Proxy-Connection: Keep-Alive
Cookie: JSESSIONID=8AF2A8A8926A7B59A74A94748657F713
Content-Type: application/octet-stream
Content-Length: 16
HTTP 1.0, assume close after body
HTTP/1.0 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/octet-stream
Content-Length: 150
Date: Mon, 09 Jul 2012 07:20:10 GMT
X-Cache: MISS from kfw3.kobil.com
X-Cache-Lookup: MISS from kfw3.kobil.com:8080
Via: 1.0 kfw3.kobil.com (squid/3.0.STABLE10)
HTTP/1.0 proxy connection set to keep alive!
Proxy-Connection: keep-alive
....
Connection #0 to host 192.168.88.189 left intact
Replaced cookie JSESSIONID="8AF2A8A8926A7B59A74A94748657F713" for domain
myhost.com, path /webapp/, expire 0
Connection #0 seems to be dead!
Closing connection #0
About to connect() to proxy 192.168.88.189 port 8080 (#0)
Trying 192.168.88.189... Host unreachable
couldn't connect to host
Closing connection #0
------------------------------
and an output when disabling the network adapter before receiving the
response (I've removed the content again and some previous messages
otherwise the log will be too large):
About to connect() to proxy 192.168.88.189 port 8080 (#0)
Trying 192.168.88.189... connected
Connected to 192.168.88.189 (192.168.88.189) port 8080 (#0)
Establish HTTP proxy tunnel to myhost.com:8445
CONNECT myhost.com:8445 HTTP/1.1
.....
Connection #0 to host 192.168.88.189 left intact
Replaced cookie JSESSIONID="1CDC72ABAB0DBA1A22E2A1C3CBAD02FD" for domain
myhost.com, path /webapp/, expire 0
Re-using existing connection! (#0) with host 192.168.88.189
Connected to 192.168.88.189 (192.168.88.189) port 8080 (#0)
POST http://myhost.com:8090/webapp HTTP/1.1
Host: myhost.com:8090
Accept: */*
Proxy-Connection: Keep-Alive
Cookie: JSESSIONID=1CDC72ABAB0DBA1A22E2A1C3CBAD02FD
Content-Type: application/octet-stream
Content-Length: 626
.....
Recv failure: Connection was reset
Connection died, retrying a fresh connect
Closing connection #0
Issue another request to this URL: 'http://myhost.com:8090/webapp'
About to connect() to proxy 192.168.88.189 port 8080 (#0)
Trying 192.168.88.189... Host unreachable
couldn't connect to host
Closing connection #0
Thank a lot.
Regards
Marco
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
- application/pkcs7-signature attachment: S/MIME Kryptografische Unterschrift