aboutsummaryrefslogtreecommitdiff
path: root/lib/urldata.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-09-14 23:33:28 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-09-22 11:58:10 +0200
commit46e164069d1a5230e4e64cbd2ff46c46cce056bb (patch)
tree140ba8a3d265bfb33f7db446d2b7b24616b5f6b0 /lib/urldata.h
parentf078361c0e2539689df9962f35ab22f8ea25afe9 (diff)
url: use the URL API internally as well
... to make it a truly unified URL parser. Closes #3017
Diffstat (limited to 'lib/urldata.h')
-rw-r--r--lib/urldata.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index 85712ba20..1fede5090 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -1224,6 +1224,18 @@ struct time_node {
expire_id eid;
};
+/* individual pieces of the URL */
+struct urlpieces {
+ char *scheme;
+ char *hostname;
+ char *port;
+ char *user;
+ char *password;
+ char *options;
+ char *path;
+ char *query;
+};
+
struct UrlState {
/* Points to the connection cache */
@@ -1314,9 +1326,6 @@ struct UrlState {
/* for FTP downloads: how many CRLFs did we converted to LFs? */
curl_off_t crlf_conversions;
#endif
- char *pathbuffer;/* allocated buffer to store the URL's path part in */
- char *path; /* path to use, points to somewhere within the pathbuffer
- area */
bool slash_removed; /* set TRUE if the 'path' points to a path where the
initial URL slash separator has been taken off */
bool use_range;
@@ -1350,6 +1359,8 @@ struct UrlState {
#ifdef CURLDEBUG
bool conncache_lock;
#endif
+ CURLU *uh; /* URL handle for the current parsed URL */
+ struct urlpieces up;
};