Subject: Buffer index protection in the case where client does not
receive content length from HTTP server
This commit is contained in:
parent
eb76310c52
commit
f9e16eacd9
1 changed files with 4 additions and 1 deletions
|
@ -610,7 +610,10 @@ spin_chunks:
|
|||
if (wsi->chunked)
|
||||
return 0;
|
||||
|
||||
wsi->u.http.content_remain -= n;
|
||||
/* if we know the content length, decrement the content remaining */
|
||||
if (wsi->u.http.content_length > 0)
|
||||
wsi->u.http.content_remain -= n;
|
||||
|
||||
if (wsi->u.http.content_remain || !wsi->u.http.content_length)
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue