diff --git a/lib/secure-streams/protocols/ss-h1.c b/lib/secure-streams/protocols/ss-h1.c index 9775a2a70..4d8cf70a9 100644 --- a/lib/secure-streams/protocols/ss-h1.c +++ b/lib/secure-streams/protocols/ss-h1.c @@ -352,10 +352,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)) {