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

Joel Winarske joel.winarske at gmail.com
Wed Mar 8 01:17:45 CET 2017


Awesome thanks!

On Tue, Mar 7, 2017 at 3:59 PM, Andy Green <andy at warmcat.com> wrote:

>
>
> 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.
>>
>
> Yeah.
>
> 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.
>
> -Andy
>
>
>>
>> Thanks,
>> Joel
>>
>>
>>
>> _______________________________________________
>> Libwebsockets mailing list
>> Libwebsockets at ml.libwebsockets.org
>> https://libwebsockets.org/mailman/listinfo/libwebsockets
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20170307/8a960a2c/attachment-0002.html>


More information about the Libwebsockets mailing list