sendf: skip storing HTTP headers if HTTP disabled

Closes #9179
This commit is contained in:
Daniel Stenberg 2022-07-20 23:29:09 +02:00
parent 3be0c67379
commit 07535a4f87
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -586,6 +586,7 @@ static CURLcode chop_write(struct Curl_easy *data,
len -= chunklen;
}
#ifndef CURL_DISABLE_HTTP
/* HTTP header, but not status-line */
if((conn->handler->protocol & PROTO_FAMILY_HTTP) &&
(type & CLIENTWRITE_HEADER) && !(type & CLIENTWRITE_STATUS) ) {
@ -598,6 +599,7 @@ static CURLcode chop_write(struct Curl_easy *data,
if(result)
return result;
}
#endif
if(writeheader) {
size_t wrote;