[Libwebsockets] lws_serve_http_file

Srikar Vadlamani SrikarVadlamani at trafficware.com
Mon Jan 30 21:30:04 CET 2017


I have a lws http server trying to send a binary json data over http, it does work without any issues on couple of computers,
And on some laptops/computers it consistently fails, what can be the possible reasons.
Logs are attached below for both,
Is there something obvious you guys see?

iRetLen = lws_serve_http_file(pWs,cRspFileName,"application/json",NULL,0);

WORKS:
: POST: Elapsed time:4332592 us
: fd=12, revents=4
(10092890,10093b10}LWS_CALLBACK_HTTP_WRITEABLE
: (10092890,10093b10}LWS_CALLBACK_HTTP_WRITEABLE:sending /home/Ret0
lws_set_timeout: 0x10092890: 20 secs
lws_set_timeout: 0x10092890: 20 secs
----- lots of lws_ser_timeout --------
: lws_set_timeout: 0x10092890: 20 secs
lws_set_timeout: 0x10092890: 20 secs
file completed
{10092890,10093b10}LWS_CALLBACK_HTTP_FILE_COMPLETION
lws_http_transaction_completed: wsi 0x10092890
{10092890,10093b10}LWS_CALLBACK_HTTP_DROP_PROTOCOL
lws_ensure_user_space: 0x10092890 protocol 0x1001e224
lws_set_timeout: 0x10092890: 5 secs
lws_http_transaction_completed: wsi->more_rx_waiting=1


DOES NOT WORK:
(1004a860,1003fc80}LWS_CALLBACK_HTTP_WRITEABLE
(1004a860,1003fc80}LWS_CALLBACK_HTTP_WRITEABLE:sending /opt/naztec/cxuhist/cxu-histlogRet0
lws_set_timeout: 0x1004a860: 20 secs
lws_set_timeout: 0x1004a860: 20 secs
lws_http_transaction_completed: wsi 0x1004a860
{1004a860,1003fc80}LWS_CALLBACK_HTTP_DROP_PROTOCOL
lws_ensure_user_space: 0x1004a860 protocol 0x1001e224
lws_set_timeout: 0x1004a860: 5 secs
lws_http_transaction_completed: wsi->more_rx_waiting=0
lws_header_table_detach: wsi 0x1004a860: ah 0x100283d8 (tsi=0, count = 1)
lws_header_table_detach: wsi 0x1004a860: ah held 7s, ah.rxpos 611, ah.rxlen 611, mode/state 0 0,wsi->more_rx_waiting 0
lws_header_table_detach: wsi 0x1004a860: ah 0x100283d8 (tsi=0, count = 0)
lws_http_transaction_completed: 0x1004a860: keep-alive await new transaction
_lws_rx_flow_control: no pending change

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20170130/c63cdcb3/attachment.html>


More information about the Libwebsockets mailing list