[Libwebsockets] "X" headers

Joel Winarske joel.winarske at gmail.com
Wed Apr 5 18:35:18 CEST 2017


Hi Andy,

When I dump all headers at LWS_CALLBACK_CLIENT_FILTER_PRE_ESTABLISH, I'm
not getting the "X" headers.

Examples:

    X-XSS-Protection: 1; mode=block\r\n
    X-Frame-Options: SAMEORIGIN\r\n

Am I doing something wrong, or are "X" headers dropped?

Enumeration code:

do {
c = lws_token_to_string(n);
if (c == NULL || *c == 0) {
n++;
continue;
}

len = lws_hdr_total_length(wsi, n);
if (!len || len > sizeof(buf) - 1) {
n++;
continue;
}

lws_hdr_copy(wsi, buf, sizeof buf, n);
buf[sizeof(buf) - 1] = '\0';
fprintf(stderr, "    %s %s\n", (char *)c, buf);
n++;
} while (c);


Thanks,
Joel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20170405/63faf152/attachment.html>


More information about the Libwebsockets mailing list