libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] How to disable the connection keep-alive header?


From: silvioprog
Subject: Re: [libmicrohttpd] How to disable the connection keep-alive header?
Date: Fri, 22 Jan 2016 14:27:33 -0300

On Fri, Jan 22, 2016 at 1:35 PM, Evgeny Grin <address@hidden> wrote: 
On 22.01.2016 17:31, silvioprog wrote:
> Hm... I saw it, but it should be disabled without force this close
> header. I'll debug it and try to send a patch...
HTTP standard forbids response without "Connection: " line in header.
[...]

Is there some link where I can get it? I need this one to document it in my framework that uses MHD.

I saw all headers from popular sites like Google and Facebook, and I didn't see the connection header. :-/ But it isn't a problem, because this sites uses HTTP 2.0, and I don't know if this one needs the connection header.

BTW, it would be nice if the keep-alive/close value in the header could be chosen via some initialization flag, something like this:

daemon =
  MHD_start_daemon(MHD_USE_SELECT_INTERNALLY, PORT, NULL, NULL, &hr, NULL,
  MHD_OPTION_CONNECTION_HEADER, "keep-alive",
  MHD_OPTION_END);

Avoiding to handle it directly in the user callback request. And more:

  (No declaration) -- uses MHD default, that's keep-alive
  MHD_OPTION_CONNECTION_HEADER, "keep-alive", -- set keep-alive
  MHD_OPTION_CONNECTION_HEADER, "close", -- set close
  MHD_OPTION_CONNECTION_HEADER, NULL, -- undeclares Connection header, so the programmer do it by own risk

What do you think? :-)

--
Silvio Clécio

reply via email to

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