[Libwebsockets] http client 201 response

Joel Winarske joel.winarske at gmail.com
Sat Apr 8 19:55:40 CEST 2017


The same for http response 401.  In the cases of 201 and 401, there is
usually a body response.  If they are treated as an error, the connection
is cut, and you'll never get a read callback.  So you can never see why.

On Sat, Apr 8, 2017 at 10:31 AM, Joel Winarske <joel.winarske at gmail.com>
wrote:

> Hi Andy,
>
> Currently http response 201 in client.c is being handled as an error.
> This is a valid response.  This is my requested change:
>
> if (!wsi->do_ws) {
> if (n != 200 && n != 201 && n != 304) {
> lwsl_notice("Connection failed with code %d\n", n);
> cce = "HS: Server did not return 200, 201, or 304";
> goto bail2;
> }
>
>
> Joel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20170408/3f23dae1/attachment-0002.html>


More information about the Libwebsockets mailing list