mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
content_length zero: client
https://github.com/warmcat/libwebsockets/issues/1337
This commit is contained in:
parent
7019b56ec9
commit
d573a06eb6
1 changed files with 9 additions and 0 deletions
|
@ -954,6 +954,15 @@ lws_client_interpret_server_handshake(struct lws *wsi)
|
|||
|
||||
lwsl_info("%s: client connection up\n", __func__);
|
||||
|
||||
/*
|
||||
* Did we get a response from the server with an explicit
|
||||
* content-length of zero? If so, this transaction is already
|
||||
* completed at the end of the header processing...
|
||||
*/
|
||||
if (lws_hdr_total_length(wsi, WSI_TOKEN_HTTP_CONTENT_LENGTH) &&
|
||||
!wsi->http.rx_content_length)
|
||||
return !!lws_http_transaction_completed_client(wsi);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue