[Libwebsockets] HTTP client receive behavior changed?

Kun Zhao kunzhao77 at gmail.com
Fri Apr 5 22:41:27 CEST 2019


Please ignore the callback sequence issue. It was my logging problem.

On Fri, Apr 5, 2019 at 3:29 PM Kun Zhao <kunzhao77 at gmail.com> wrote:

> The COMPLETED_CLIENT_HTTP is called before the last RECEIVE_CLIENT_HTTP.
> Here is the callback sequence.
>
> [2019/04/05 15:18:16:7170] INFO: lws_client_interpret_server_handshake:
> client connection up
> ******** LWS_CALLBACK_RECEIVE_CLIENT_HTTP
> ******** LWS_CALLBACK_RECEIVE_CLIENT_HTTP
> ******** LWS_CALLBACK_RECEIVE_CLIENT_HTTP
> ******** LWS_CALLBACK_RECEIVE_CLIENT_HTTP
> ******** LWS_CALLBACK_RECEIVE_CLIENT_HTTP
> ******** LWS_CALLBACK_RECEIVE_CLIENT_HTTP
> ******** LWS_CALLBACK_RECEIVE_CLIENT_HTTP
> ******** LWS_CALLBACK_RECEIVE_CLIENT_HTTP
> ******** LWS_CALLBACK_RECEIVE_CLIENT_HTTP
> ******** LWS_CALLBACK_COMPLETED_CLIENT_HTTP
> ******** LWS_CALLBACK_RECEIVE_CLIENT_HTTP
> [2019/04/05 15:18:16:7187] INFO: lws_http_transaction_completed_client:
> wsi: 0x7fd6c8000b60, wsi_eff: 0x7fd6c8000b60 (http)
> [2019/04/05 15:18:16:7187] INFO: lws_http_transaction_completed_client:
> nothing pipelined waiting
> ******** LWS_CALLBACK_CLOSED_CLIENT_HTTP
> [2019/04/05 15:18:22:0037] INFO: wsi 0x7fd6c8000b60: TIMEDOUT WAITING on
> 27 (did hdr 0, ah 0x7fd6c8000e60, wl 0, pfd events 1) 1554495502 vs 5
> [2019/04/05 15:18:22:0037] INFO: __lws_close_free_wsi: 0x7fd6c8000b60:
> caller: timeout
>
>
> On Fri, Apr 5, 2019 at 2:28 PM Kun Zhao <kunzhao77 at gmail.com> wrote:
>
>> Hi Andy,
>>
>> I updated libwebsockets from 3.0 to master branch today. I noticed a
>> behavior change in HTTP client. HTTP client used to receive data in
>> LWS_CALLBACK_RECEIVE_CLIENT_HTTP_READ callback. Now the
>> LWS_CALLBACK_RECEIVE_CLIENT_HTTP_READ is never called (I guess for
>> un-chunked data) and the data is provided in
>> LWS_CALLBACK_RECEIVE_CLIENT_HTTP.
>>
>> Just want to check with you if this is the correct behavior because of
>> all the minimal examples and test client are still read data in
>> LWS_CALLBACK_RECEIVE_CLIENT_HTTP_READ  callback.
>>
>> Thank,
>> Kun
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20190405/5d8150c7/attachment-0001.htm>


More information about the Libwebsockets mailing list