mirror of
https://github.com/curl/curl.git
synced 2026-08-24 23:23:32 +03:00
HTTP: allow "header;" to replace an internal header with a blank one
Reported-by: Michael Kaufmann Fixes #2357 Closes #2362
This commit is contained in:
parent
019aa722aa
commit
8123560d44
9 changed files with 286 additions and 87 deletions
|
|
@ -5,7 +5,7 @@
|
|||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
|
|
@ -252,7 +252,7 @@ static CURLcode CONNECT(struct connectdata *conn,
|
|||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
if(!Curl_checkProxyheaders(conn, "Host:")) {
|
||||
if(!Curl_checkProxyheaders(conn, "Host")) {
|
||||
host = aprintf("Host: %s\r\n", hostheader);
|
||||
if(!host) {
|
||||
free(hostheader);
|
||||
|
|
@ -260,10 +260,10 @@ static CURLcode CONNECT(struct connectdata *conn,
|
|||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
}
|
||||
if(!Curl_checkProxyheaders(conn, "Proxy-Connection:"))
|
||||
if(!Curl_checkProxyheaders(conn, "Proxy-Connection"))
|
||||
proxyconn = "Proxy-Connection: Keep-Alive\r\n";
|
||||
|
||||
if(!Curl_checkProxyheaders(conn, "User-Agent:") &&
|
||||
if(!Curl_checkProxyheaders(conn, "User-Agent") &&
|
||||
data->set.str[STRING_USERAGENT])
|
||||
useragent = conn->allocptr.uagent;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue