aboutsummaryrefslogtreecommitdiff
path: root/lib/http.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-04-27 13:56:23 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-04-27 13:56:23 +0000
commit4b9f8e766d0c4d989b0188a6dfd3c667e49a93a9 (patch)
treecf197c8327367708436d964e05547010e6d3adb5 /lib/http.c
parent96002646f117b9547bf64a8e9d62ad9f2fefa543 (diff)
Made host name and proxy name get stored in a 'struct hostname' and set
all things up to work with encoded host names internally, as well as keeping 'display names' to show in debug messages. IDN resolves work for me now using ipv6, ipv4 and ares resolving. Even cookies on IDN sites seem to do right.
Diffstat (limited to 'lib/http.c')
-rw-r--r--lib/http.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/http.c b/lib/http.c
index 4cc813e98..4c517eb0e 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -253,7 +253,7 @@ static CURLcode http_auth_headers(struct connectdata *conn,
host due to a location-follow, we do some weirdo checks here */
if(!data->state.this_is_a_follow ||
!data->state.auth_host ||
- curl_strequal(data->state.auth_host, TRUE_HOSTNAME(conn)) ||
+ curl_strequal(data->state.auth_host, conn->host.name) ||
data->set.http_disable_hostname_check_before_authentication) {
/* Send proxy authentication header if needed */
@@ -1113,7 +1113,8 @@ CURLcode Curl_http_connect(struct connectdata *conn)
/* either HTTPS over proxy, OR explicitly asked for a tunnel */
result = Curl_ConnectHTTPProxyTunnel(conn, FIRSTSOCKET,
- TRUE_HOSTNAME(conn), conn->remote_port);
+ conn->host.name,
+ conn->remote_port);
if(CURLE_OK != result)
return result;
}
@@ -1132,7 +1133,7 @@ CURLcode Curl_http_connect(struct connectdata *conn)
/* Free to avoid leaking memory on multiple requests*/
free(data->state.auth_host);
- data->state.auth_host = strdup(TRUE_HOSTNAME(conn));
+ data->state.auth_host = strdup(conn->host.name);
}
return CURLE_OK;
@@ -1219,7 +1220,7 @@ CURLcode Curl_http(struct connectdata *conn)
struct HTTP *http;
struct Cookie *co=NULL; /* no cookies from start */
char *ppath = conn->path;
- char *host = TRUE_HOSTNAME(conn);
+ char *host = conn->host.name;
const char *te = ""; /* tranfer-encoding */
char *ptr;
char *request;