aboutsummaryrefslogtreecommitdiff
path: root/lib/urldata.h
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/urldata.h
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/urldata.h')
-rw-r--r--lib/urldata.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index 1912bcf0f..19e83ca4f 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -304,6 +304,13 @@ struct ConnectBits {
bool no_body; /* CURLOPT_NO_BODY (or similar) was set */
};
+struct hostname {
+ char *rawalloc; /* allocated "raw" version of the name */
+ char *encalloc; /* allocated IDN-encoded version of the name */
+ char *name; /* name to use internally, might be encoded, might be raw */
+ char *dispname; /* name to display, as 'name' might be encoded */
+};
+
/*
* This struct is all the previously local variables from Curl_perform() moved
* to struct to allow the function to return and get re-invoked better without
@@ -428,16 +435,10 @@ struct connectdata {
struct sockaddr_in serv_addr;
#endif
char protostr[64]; /* store the protocol string in this buffer */
- char *namebuffer; /* allocated buffer to store the hostname in */
- char *hostname; /* hostname to use, as parsed from url. points to
- somewhere within the namebuffer[] area */
-#ifdef USE_LIBIDN
- char *ace_hostname; /* hostname possibly converted to ACE form */
-#define TRUE_HOSTNAME(conn) \
- (conn->ace_hostname ? conn->ace_hostname : conn->hostname)
-#else
-#define TRUE_HOSTNAME(conn) conn->hostname
-#endif
+
+ struct hostname host;
+ struct hostname proxy;
+
char *pathbuffer;/* allocated buffer to store the URL's path part in */
char *path; /* path to use, points to somewhere within the pathbuffer
area */
@@ -456,8 +457,6 @@ struct connectdata {
this syntax. */
curl_off_t resume_from; /* continue [ftp] transfer from here */
- char *proxyhost; /* name of the http proxy host */
-
char *user; /* user name string, allocated */
char *passwd; /* password string, allocated */