http post zero content length
Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
c0b0c3d1e2
commit
0a05792d8d
1 changed files with 13 additions and 0 deletions
|
@ -125,6 +125,19 @@ http_new:
|
|||
goto read_ok;
|
||||
case WSI_STATE_HTTP_BODY:
|
||||
wsi->u.http.content_remain = wsi->u.http.content_length;
|
||||
if (!wsi->u.http.content_remain) {
|
||||
/* there is no POST content */
|
||||
libwebsocket_set_timeout(wsi, NO_PENDING_TIMEOUT, 0);
|
||||
if (wsi->protocol->callback) {
|
||||
n = wsi->protocol->callback(
|
||||
wsi->protocol->owning_server, wsi,
|
||||
LWS_CALLBACK_HTTP_BODY_COMPLETION,
|
||||
wsi->user_space, NULL, 0);
|
||||
if (n)
|
||||
goto bail;
|
||||
}
|
||||
goto http_complete;
|
||||
}
|
||||
goto http_postbody;
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue