[Libwebsockets] libwebsockets-1.4 HTTP server help with huge http chunks
ash20001 at hotmail.com
Tue Jun 30 07:08:58 CEST 2015
Hello,I am trying to host an HTTP server (using the test-server.c sample code). I have a client app that sends big chunks of HTTP data (around 10k-15k) to the server.The server doesn't seem to parse the body fragments well.
By default libwebsockets delivers data in 4k chunks. This seems to work fine for chunks less than 8k after adding libbwesockets_return_http_status with HTTP_OK after each LWS_CALLBACK_HTTP_BODY message. In the case of less than 8K and greater than 4K, I get two LWS_CALLBACK_HTTP_BODY message, the first with 4k and then the remaining amount in the next message. Then I received the LWS_CALLBACK_HTTP_BODY_COMPLETION message.
But If I try something bigger than 8k, I never get the 3rd or higher chunk in the BODY Message, and sometimes the whole client app errors out. I cannot find any sample out there to properly handle large HTTP chunks. I am hoping maybe you guys might have something out there.
Also, changing the rx_buffer_size in the http protocol seems to make no difference.
Thanks for any help!!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libwebsockets