curl-library
Re: Race condition if server responds during POST
Date: Thu, 20 Feb 2014 23:49:02 +0100 (CET)
On Thu, 20 Feb 2014, Justin Karneges wrote:
> Response looks okay. You can see in my original email the headers that were
> received, and also that a 13 byte body was received, which is all correct.
> My program then does not receive CURLMSG_DONE until 10 seconds pass.
Ah yes. But I notice now that the server sends a chunked encoded response, so
what you see in your callback is only the "payload" part of those chunks, you
don't see the final chunk for example. Perhaps it is that one that is delayed?
> However, I am now wondering if this is really an Apache/WSGI/Django bug. I
> created a simple HTTP server test in python to provide the necessary
> behavior:
...
> I am unable to reproduce the bug when connecting curl to this server! Perhaps
> the mysterious 10 second delay is within the Apache stack. Yikes.
You should be able to tell fairly easy by wiresharking the connection and
looking at exactly what the server does with the TCP connection and when it
sends its response. I too get the feeling this could be a server-side thing.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2014-02-20