[Libwebsockets] How to reply a "WWW-Authenticate" field ?

Shmuel Weiss sweiss at kramerel.com
Wed Jul 20 21:08:35 CEST 2016

Hi All,

What is the right way to reply
WWW-Authenticate: Basic realm="User Visible Realm"

Into this authentication failure response ?

if (authentication_is_on && authentication_failed )
             lwsl_err("authentication failed %s\n", buf);
             lws_return_http_status( wsi,
                       HTTP_STATUS_UNAUTHORIZED, NULL);
             return -1;



Shmuel Weiss
Kramer Electronics
Project Lead and Software Team Leader

Email: sweiss at kramerel.com<mailto:sweiss at kramerel.com>    Web: www.kramerelectronics.com<http://www.kramerelectronics.com/>    Tel: +972-73-2650405
Cell: +972-54-3344141    Fax: +972-2-6535369    Address: 3 Am VeOlamo, Jerusalem, 9546303, Israel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20160720/7337e484/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 1664 bytes
Desc: image001.png
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20160720/7337e484/attachment.png>

More information about the Libwebsockets mailing list