http_proxy: fix user-agent and custom headers for CONNECT with hyper

Enable test 287

Closes #7598
This commit is contained in:
Daniel Stenberg 2021-08-20 13:34:51 +02:00
parent f46b83fc94
commit 059379d20c
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 5 additions and 4 deletions

View File

@ -840,9 +840,8 @@ static CURLcode CONNECT(struct Curl_easy *data,
Curl_hyper_header(data, headers, data->state.aptr.proxyuserpwd))
goto error;
if(data->set.str[STRING_USERAGENT] &&
*data->set.str[STRING_USERAGENT] &&
data->state.aptr.uagent &&
if(!Curl_checkProxyheaders(data, conn, "User-Agent") &&
data->set.str[STRING_USERAGENT] &&
Curl_hyper_header(data, headers, data->state.aptr.uagent))
goto error;
@ -850,6 +849,9 @@ static CURLcode CONNECT(struct Curl_easy *data,
Curl_hyper_header(data, headers, "Proxy-Connection: Keep-Alive"))
goto error;
if(Curl_add_custom_headers(data, TRUE, headers))
goto error;
sendtask = hyper_clientconn_send(client, req);
if(!sendtask) {
failf(data, "hyper_clientconn_send");

View File

@ -44,7 +44,6 @@
262
265
266
287
319
326
357