<div dir="ltr">Oh cool!  Thank you!</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 8, 2017 at 5:15 PM, Andy Green <span dir="ltr"><<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On 02/09/2017 09:12 AM, Joel Winarske wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Operator error.  It works great now.<br>
<br>
I just needed to implement LWS_CALLBACK_RECEIVE_CLIENT_HT<wbr>TP_READ to handle the chunks.<br>
</blockquote>
<br></span>
Ha... yes that is right... I was sat here improving the test client to do it and documenting the function better.  It should do it and explain how to do it better it's not really operator error.<br>
<br>
The reason is when in chunking transfer mode,  the chunking headers are inline with the data, it has to send separate buffer / length chunks for each chunk or partial chunk.<br>
<br>
I'll push it in a few minutes.<br>
<br>
-Andy<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br>
On Wed, Feb 8, 2017 at 12:40 PM, Joel Winarske <<a href="mailto:joel.winarske@gmail.com" target="_blank">joel.winarske@gmail.com</a> <mailto:<a href="mailto:joel.winarske@gmail.com" target="_blank">joel.winarske@gmail.co<wbr>m</a>>> wrote:<br>
<br>
    I added a printout of the return value from lws_ssl_capable_read()<br>
    in lws_http_client_read, and it reports what looks like a sane value.<br>
<br>
<br>
    On Wed, Feb 8, 2017 at 11:38 AM, Joel Winarske<br></span><div><div class="h5">
    <<a href="mailto:joel.winarske@gmail.com" target="_blank">joel.winarske@gmail.com</a> <mailto:<a href="mailto:joel.winarske@gmail.com" target="_blank">joel.winarske@gmail.co<wbr>m</a>>> wrote:<br>
<br>
        In the below scenario I was figuring I should see nine<br>
        different LWS_CALLBACK_RECEIVE_CLIENT_HT<wbr>TP callbacks, as well<br>
        as valid read lengths.  Am I missing something?<br>
<br>
        $ ./libwebsockets-test-client <a href="http://inrix.com" rel="noreferrer" target="_blank">http://inrix.com</a><br>
        ...<br>
        [2017/02/08 08:58:26:9465] NOTICE: http: connecting<br>
        [2017/02/08 08:58:26:9575] NOTICE: dumb:<br>
        LWS_CALLBACK_CLIENT_APPEND_HAN<wbr>DSHAKE_HEADER<br>
        [2017/02/08 08:58:26:9662] NOTICE: dumb:<br>
        LWS_CALLBACK_ESTABLISHED_CLIEN<wbr>T_HTTP 200<br>
        [2017/02/08 08:58:26:9663] NOTICE:<br>
        lws_client_interpret_server_ha<wbr>ndshake: client connection up<br>
        [2017/02/08 08:58:26:9663] NOTICE: dumb:<br>
        LWS_CALLBACK_RECEIVE_CLIENT_HT<wbr>TP<br>
        [2017/02/08 08:58:26:9663] NOTICE: lws_http_client_read len=0<br>
        [2017/02/08 08:58:26:9681] NOTICE: dumb:<br>
        LWS_CALLBACK_RECEIVE_CLIENT_HT<wbr>TP<br>
        [2017/02/08 08:58:26:9682] NOTICE: lws_http_client_read len=0<br>
        [2017/02/08 08:58:26:9701] NOTICE: dumb:<br>
        LWS_CALLBACK_RECEIVE_CLIENT_HT<wbr>TP<br>
        [2017/02/08 08:58:26:9701] NOTICE: lws_http_client_read len=0<br>
        [2017/02/08 08:58:26:9720] NOTICE: dumb:<br>
        LWS_CALLBACK_RECEIVE_CLIENT_HT<wbr>TP<br>
        [2017/02/08 08:58:26:9721] NOTICE: lws_http_client_read len=0<br>
        [2017/02/08 08:58:26:9738] NOTICE: dumb:<br>
        LWS_CALLBACK_RECEIVE_CLIENT_HT<wbr>TP<br>
        [2017/02/08 08:58:26:9739] NOTICE: dumb:<br>
        LWS_CALLBACK_COMPLETED_CLIENT_<wbr>HTTP<br>
        [2017/02/08 08:58:26:9739] NOTICE: lws_http_client_read len=3<br>
<br>
<br>
        [2017/02/08 08:58:26:9739] ERR: Exiting<br>
        [2017/02/08 08:58:26:9739] NOTICE: lws_context_destroy: ctx<br>
        0x1d01990<br>
        [2017/02/08 08:58:26:9739] NOTICE: lws_context_destroy2: ctx<br>
        0x1d01990<br>
<br>
<br>
        In wireshark for the above I saw eight TCP packets with the<br>
        following lengths - 4104, 2736, 2736, 2736, 5472, 1368, 4104,<br>
        1851.<br>
<br>
<br>
        Joel<br>
<br>
<br>
<br>
<br>
<br></div></div>
______________________________<wbr>_________________<br>
Libwebsockets mailing list<br>
<a href="mailto:Libwebsockets@ml.libwebsockets.org" target="_blank">Libwebsockets@ml.libwebsockets<wbr>.org</a><br>
<a href="https://libwebsockets.org/mailman/listinfo/libwebsockets" rel="noreferrer" target="_blank">https://libwebsockets.org/mail<wbr>man/listinfo/libwebsockets</a><br>
</blockquote>
<br>
</blockquote></div><br></div>