[Libwebsockets] LWS_WITH_HTTP_UNCOMMON_HEADERS compile problem

Jakov Smolic jakov.smolic at sartura.hr
Fri May 1 16:08:10 CEST 2020


Okay, that makes sense, I'll try turning LWS_WITH_BASIC_AUTH off as well.

Thank you for your swift response.

Regards,
Jakov

On Fri, May 1, 2020 at 4:00 PM Andy Green <andy at warmcat.com> wrote:

>
>
> On 5/1/20 2:54 PM, Jakov Smolic wrote:
> > Hi Andy,
> > building libwebsockets on Gentoo Linux uncommon header support turned
> > off causes some build problems.
> > Namely, I get this error:
> >
> >
> /var/tmp/portage/net-libs/libwebsockets-4.0.4/work/libwebsockets-4.0.4/lib/roles/http/server/server.c:
>
> > In function 'lws_unauthorised_basic_auth':
> >
> /var/tmp/portage/net-libs/libwebsockets-4.0.4/work/libwebsockets-4.0.4/lib/roles/http/server/server.c:873:4:
>
> > error: 'WSI_TOKEN_HTTP_WWW_AUTHENTICATE' undeclared (first use in this
> > function); did you mean 'WSI_TOKEN_HTTP_CONTENT_RANGE'?
> >    873 |    WSI_TOKEN_HTTP_WWW_AUTHENTICATE,
> >        |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >        |    WSI_TOKEN_HTTP_CONTENT_RANGE
> >
> /var/tmp/portage/net-libs/libwebsockets-4.0.4/work/libwebsockets-4.0.4/lib/roles/http/server/server.c:873:4:
>
> > note: each undeclared identifier is reported only once for each function
> > it appears in
> >
> > I'm not sure if this is related with my build configuration or something
> > else.
>
> I think it just means if you want LWS_WITH_HTTP_BASIC_AUTH, it needs the
> uncommon headers then, since WWW_AUTHENTICATE is counted among them.
> The idea of splitting the headers was to make sure really small
> implementations don't get burdened with dealing with headers related to
> h2 / ws / funny headers they're not using (the heap usage / size of the
> ah is related to this as well).
>
> You can either turn LWS_WITH_HTTP_BASIC_AUTH off or enable uncommon
> headers I guess.  It probably makes sense for BASIC_AUTH to enable
> uncommon headers in the CMakeLists.txt if that's all it is.
>
> -Andy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20200501/68322e86/attachment.htm>


More information about the Libwebsockets mailing list