[Libwebsockets] Excessive Header Content

Andy Green andy at warmcat.com
Fri Aug 22 14:46:10 CEST 2014

On 22 August 2014 20:37:18 GMT+08:00, Sazali Hisham <sazalihisham at gmail.com> wrote:
>Hi Andy,
>Thank you very much for your instance advice for my previous
>I have another problem. How to avoid excessive header content warning?
>I'm redirecting the all http request to my libwebsocket server to
>emulate a
>captive portal. However certain requests (which originally send to
>websites) cause this warning and after that it appear that I cannot
>the response for that request anymore.

In private-libwebsockets.h there is this -->

#define LWS_MAX_HEADER_LEN 1024

This is the maximum size of header content that lws is willing to deal with.

If you think it's correct to get back a header bigger than this, you can override it by changing the definition or, because it has #ifndef, you can force the definition at the compiler as well with -DLWS_MAX_HEADER_LEN=2048 or whatever.

But that's a big header already...


>Thanks in advance!
>Libwebsockets mailing list
>Libwebsockets at ml.libwebsockets.org

More information about the Libwebsockets mailing list