From b8b56248bddc646bf8d262dc9c5b45ce68a1ef08 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 10 Sep 2004 20:58:51 +0000 Subject: - 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. --- lib/urldata.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/urldata.h') diff --git a/lib/urldata.h b/lib/urldata.h index 7be2a9324..e50a589ca 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -720,10 +720,10 @@ struct UrlState { bytes / second */ bool this_is_a_follow; /* this is a followed Location: request */ - char *auth_host; /* if set, this should be the host name that we will - sent authorization to, no else. Used to make Location: - following not keep sending user+password... This is - strdup() data. + char *first_host; /* if set, this should be the host name that we will + sent authorization to, no else. Used to make Location: + following not keep sending user+password... This is + strdup() data. */ struct curl_ssl_session *session; /* array of 'numsessions' size */ -- cgit v1.2.3