libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] Connection: header


From: Christian Grothoff
Subject: Re: [libmicrohttpd] Connection: header
Date: Thu, 05 Jun 2014 19:44:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10

On 06/05/2014 07:39 PM, Luke Dashjr wrote:
> On Thursday, June 05, 2014 5:37:43 PM Christian Grothoff wrote:
>> On 06/05/2014 06:47 PM, Luke Dashjr wrote:
>>> At some point, the Connection: Keep-Alive header was added by
>>> libmicrohttpd. Unfortunately, in some circumstances, this is breaking a
>>> buggy client I have to support. Is it possible to turn it off? Reading
>>> the code, I don't see a way (and it seems to even override a user-set
>>> Connection header).
>>
>> Hmm.  The goal was that if the application explicitly sets a connection
>> header (Connection: close), MHD should obey that choice and not override
>> it in any way (and close the connection after the request).  I'm also
>> pretty positive there is code that does that check; however, if it fails
>> for you, I'd certainly appreciate a test.
> 
> I'm thinking circumstances like Connection: foobar

I suspect MHD should pass that along as well, but I'm not sure.
It is in any case not valid HTTP, as only 'close' and 'keep-alive'
are specified in the standard.  For MHD, that header creates the
confusion that it won't know if 'foobar' means to keep the connection
open or to close it...

>> What is not possible right now is to force MHD to not generate any
>> "Connection"
>> header; that'd need an API extension.  But, try adding "Connection:
>> close" first,
>> and if that somehow fails to show up properly on the wire, please send a
>> testcase
>> and I'll be happy to take a close look at it.
> 
> Connection: close (or really *any* Connection header) will also break the 
> client in question :(

Sounds like the kind of software that shouldn't be on any network...
Anyway, I could imagine having an option like "force_http_10" that
would tell MHD to always close connections after the first request
and never add connection headers.

Still, that leaves the question if that should be an option for the
entire HTTP server (all responses) or a per-response option.

Opinions? Alternative ideas?

-Christian



reply via email to

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