1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

ss: Support content-length on PUT as well as PUSH

This commit is contained in:
Jed Lu 2020-05-27 13:38:44 +01:00 committed by Andy Green
parent 6d52147476
commit 9290053f5b

View file

@ -364,10 +364,11 @@ malformed:
}
/*
* Content-length on POST if we have the length information
* Content-length on POST / PUT if we have the length information
*/
if (!strcmp(h->policy->u.http.method, "POST") &&
if ((!strcmp(h->policy->u.http.method, "POST") ||
!strcmp(h->policy->u.http.method, "PUT")) &&
wsi->http.writeable_len) {
if (!(h->policy->flags &
LWSSSPOLF_HTTP_NO_CONTENT_LENGTH)) {