← Commit list

aacbe4d9bf

Jacek Migacz
Jacek Migacz
2026-01-22
SUCCESS Duration: 321s

Subject

tool: enable header separation for HTTPS proxies

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

src/config2setopts.c+5 -1
@@ -498,7 +498,6 @@ static CURLcode http_setopts(struct OperationConfig *config, CURL *curl)
if(config->proxyheaders) {
my_setopt_slist(curl, CURLOPT_PROXYHEADER, config->proxyheaders);
- my_setopt_long(curl, CURLOPT_HEADEROPT, CURLHEADER_SEPARATE);
}
my_setopt_long(curl, CURLOPT_MAXREDIRS, config->maxredirs);
@@ -882,6 +881,11 @@ CURLcode config2setopts(struct OperationConfig *config,
result = cookie_setopts(config, curl);
if(result)
return result;
+ /* Enable header separation when using a proxy with HTTPS or proxytunnel
+ * to prevent --header content from leaking into CONNECT requests */
+ if((config->proxy || config->proxyheaders) &&
+ (use_proto == proto_https || config->proxytunnel))
+ my_setopt_long(curl, CURLOPT_HEADEROPT, CURLHEADER_SEPARATE);
}
if(use_proto == proto_ftp || use_proto == proto_ftps) {