libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] suspend/resume patch


From: Christian Grothoff
Subject: Re: [libmicrohttpd] suspend/resume patch
Date: Sun, 29 May 2016 20:53:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.6.0

On 05/17/2016 09:53 AM, José Bollo wrote:
> Le mercredi 20 avril 2016 à 20:41 +0300, Evgeny Grin a écrit :
> Please could check again whether the following patch that avoid to
> close the connection when upgrade is called is valid or not.
> 
> diff -Naur a/src/microhttpd/connection.c b/src/microhttpd/connection.c
> --- a/src/microhttpd/connection.c     2016-04-08 19:02:26.000000000
> +0000
> +++ b/src/microhttpd/connection.c     2016-04-08 19:02:26.000000000
> +0000
> @@ -731,8 +731,7 @@
>    {
>      if (NULL == end)
>        return MHD_YES;
> -    if ( (MHD_str_equal_caseless_ (end, "close")) ||
> -         (MHD_str_equal_caseless_ (end, "upgrade")) )
> +    if ( (MHD_str_equal_caseless_ (end, "close")) )
>        return MHD_NO;
>     return MHD_YES;
>    }


Well, as usual the situation isn't quite that simple. As you can see in

http://lists.gnu.org/archive/html/libmicrohttpd/2014-12/msg00000.html

this case was actually introduced to help Gregory support "upgrade", so
now you're asking us to remove to help you support "upgrade". Funny...

As discussed in the old threat, the issue is simply more complicated and
neither version will fully do; "upgrade" needs more logic in various
places, as we need to not generate "Connection: Keep-alive" (as Gregory
points out), but also not close the socket.


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]