[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] Missing Connection close header
From: |
Christian Grothoff |
Subject: |
Re: [libmicrohttpd] Missing Connection close header |
Date: |
Fri, 10 Apr 2015 22:06:19 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.5.0 |
Actually, it should be
if ( ( (NULL != client_requested_close) ||
(MHD_YES == connection->read_closed) ) &&
(NULL == response_has_close) &&
(0 == (connection->response->flags & MHD_RF_HTTP_VERSION_1_0_ONLY) ) )
must_add_close = MHD_YES;
(As in, if the flag is *not* set, we should add Connection: Close).
Fixed in SVN 35530, thanks for reporting!
Happy hacking!
Christian
On 04/10/2015 05:21 PM, address@hidden wrote:
> Hi,
>
> There is a change of behavior between 0.9.37 and 0.9.38.
> When a client adds a "Connection: close" header in 0.9.37, MHD adds a
> "Connection: close" header to its response and then
> close the connection (as suggested in rfc2616, section 8.1.2.1).
> The "Connection: close" header is not added in 0.9.38.
> I looked into the 0.9.38 code and the code that prevents the inclusion of the
> "Connection: close" header is at line 773 of connection.c.
> if ( ( (NULL != client_requested_close) ||
> (MHD_YES == connection->read_closed) ) &&
> (NULL == response_has_close) &&
> (0 != (connection->response->flags & MHD_RF_HTTP_VERSION_1_0_ONLY) ) )
> must_add_close = MHD_YES;
>
> Shouldn't it read
> if ( ( (NULL != client_requested_close) ||
> (MHD_YES == connection->read_closed) ||
> (0 != (connection->response->flags & MHD_RF_HTTP_VERSION_1_0_ONLY) ) ) &&
> (NULL == response_has_close) )
> must_add_close = MHD_YES;
>
> Thanks,
>
> Louis Benoit
>
- [libmicrohttpd] Missing Connection close header, louisbenoit, 2015/04/10
- Re: [libmicrohttpd] Missing Connection close header,
Christian Grothoff <=
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- [libmicrohttpd] Epoll busy looping for HTTPS, louisbenoit, 2015/04/12
- Re: [libmicrohttpd] Epoll busy looping for HTTPS, Christian Grothoff, 2015/04/12
- Message not available
- Message not available
- Message not available
- Message not available
- [libmicrohttpd] Connection time out and MHD_USE_POLL_INTERNALLY causes busy loop, louisbenoit, 2015/04/14
- Re: [libmicrohttpd] Connection time out and MHD_USE_POLL_INTERNALLY causes busy loop, Christian Grothoff, 2015/04/14
- [libmicrohttpd] Re : Re: Connection time out and MHD_USE_POLL_INTERNALLY causes busy loop, louisbenoit, 2015/04/16
- Re: [libmicrohttpd] Re : Re: Connection time out and MHD_USE_POLL_INTERNALLY causes busy loop, Christian Grothoff, 2015/04/17