- Bug report #1025986. When following a Location: with a custom Host: header
replacement, curl only replaced the Host: header on the initial request and didn't replace it on the following ones. This resulted in requests with two Host: headers. Now, curl checks if the location is on the same host as the initial request and then continues to replace the Host: header. And when it moves to another host, it doesn't replace the Host: header but it also doesn't make the second Host: header get used in the request. This change is verified by the two new test cases 184 and 185.
This commit is contained in:
@@ -211,7 +211,7 @@ CURLcode Curl_close(struct SessionHandle *data)
|
||||
if(data->change.cookielist) /* clean up list if any */
|
||||
curl_slist_free_all(data->change.cookielist);
|
||||
|
||||
Curl_safefree(data->state.auth_host);
|
||||
Curl_safefree(data->state.first_host);
|
||||
Curl_safefree(data->state.scratch);
|
||||
|
||||
if(data->change.proxy_alloc)
|
||||
|
||||
Reference in New Issue
Block a user