[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] Issues with multiple connections
From: |
Christian Grothoff |
Subject: |
Re: [libmicrohttpd] Issues with multiple connections |
Date: |
Sun, 22 Jun 2014 00:30:02 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0 |
Hi!
I've thought about the issue and analyzed the code and found a place
where a response was modified without locking. This only happens if you
use a threaded MHD and share a response object among multiple
connections and rely on MHD to "complete" the header and are unlucky in
that the response is used by multiple clients before the first one had a
chance to 'complete' the headers. So that might fit your scenario. I'm
not sure why it is a regression, except that I think the "Connection:
Keep-Alive" header specifically might not have been auto-added in 0.9.25
(and other headers you might have overlooked and/or set yourself and/or
not hit due to timing issues).
Anyway, I've tried to fix this in SVN 33742, please let me know if this
fixes your problem.
Happy hacking!
Christian
On 06/20/2014 02:25 PM, Shilpa S wrote:
> Hello,
>
>
>
> I have the latest version of microhttps installed and when I try to send
> POST request on multiple connections, I randomly get a response which looks
> like this
>
>
>
> HTTP/1.1 201 Created
>
> Connection: Keep-Alive
>
> Connection: Keep-Alive
>
> Content-Length: 0
>
>
>
> .....................................
>
>
>
> or this
>
>
>
> ......................Connection: Keep-Alive
>
> Content-Length: 0
>
> Connection: Keep-Alive
>
> Content-Length: 0
>
>
>
> .....................................
>
>
>
> instead of
>
> HTTP/1.1 201 Created
>
> Connection: Keep-Alive
>
> Content-Length: 0
>
> Date: Thu, 19 Jun 2014 18:04:47 GMT
>
>
> Is there something I need to change or do?
> The version 9.25 was working fine.
> Please advise.
>
> Thanks,
> Shilpa
>