[Libwebsockets] [http client relay] lws_add_http_header_status() / implicit server header

Andy Green andy at warmcat.com
Wed Mar 8 00:59:45 CET 2017

On 03/08/2017 01:42 AM, Joel Winarske wrote:
> Hi Andy,
> In lws_add_http_header_status() there is an implicit server header added.


> In case of http client re-direction, I end up with multiple server 
> headers.

I guess you don't mean "client redirection", which gives you a blank 
slate each time... you mean "proxying content from a different server 
and adding its server header by hand" is it?

> I only want the originating server header.  Is it possible to have a 
> flavor of lws_add_http_header_status() that can suppress the addition 
> of the server header, so I can add originating server manually?  
> Perhaps an optional parameter to prevent it from being added?

A lot of people probably use that API already... rather than change it I 
added a flag LWSAHH_FLAG_NO_SERVER_NAME you can apply to the reason code 
to suppress the server name.  In addition if you don't set a server name 
in the context creation info, it won't default to adding "libwebsockets" 
any more.  People who don't care won't have to change anything.


> Thanks,
> Joel
> _______________________________________________
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
> https://libwebsockets.org/mailman/listinfo/libwebsockets

More information about the Libwebsockets mailing list