libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] Tiny request


From: Christian Grothoff
Subject: Re: [libmicrohttpd] Tiny request
Date: Thu, 04 Dec 2014 00:47:20 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0

Done (SVN 34474). -Christian

On 12/04/2014 12:30 AM, Junker, Gregory wrote:
> Hi all
> 
> I need a tiny addition made to connection.c.
> 
> In keepalive_possible(), can we change the line that says
> 
>     if (0 == strcasecmp (end, "close"))
> 
> to
> 
> 
> 
>     if (0 == strcasecmp (end, "close") || 0 == strcasecmp (end, "upgrade"))
> 
> ?
> 
> This would make it possible to use libmicrohttpd in a WebSocket (RFC6455) 
> environment. Currently, the way that the WebSocket protocol works, it sends 
> "Connection: Upgrade" in the headers with the initial handshake, which causes 
> this check to fail and (ultimately) insert "Connection: Keep-Alive" in the 
> response headers (which cause any compliant WebSocket client to fail the 
> handshake, since it needs "Connection: Upgrade" in the response headers, and 
> there is no way to remove this keepalive header from the response from 
> outside of MHD, as it is added automatically to the response buffer).
> 
> Note that this is only an HTTP/1.1 issue, AFAIK (I am pretty sure, though not 
> positive, that WebSocket is not compatible with HTTP/1.0).
> 
> Thanks!
> Greg
> 

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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