summaryrefslogtreecommitdiff
path: root/lib/pop3.c
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/pop3.c
parentf078361c0e2539689df9962f35ab22f8ea25afe9 (diff)
downloadcurl-46e164069d1a5230e4e64cbd2ff46c46cce056bb.tar.gz
url: use the URL API internally as well
... to make it a truly unified URL parser. Closes #3017
Diffstat (limited to 'lib/pop3.c')
-rw-r--r--lib/pop3.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/pop3.c b/lib/pop3.c
index cd994f63d..5e0fd2299 100644
--- a/lib/pop3.c
+++ b/lib/pop3.c
@@ -1303,8 +1303,6 @@ static CURLcode pop3_regular_transfer(struct connectdata *conn,
static CURLcode pop3_setup_connection(struct connectdata *conn)
{
- struct Curl_easy *data = conn->data;
-
/* Initialise the POP3 layer */
CURLcode result = pop3_init(conn);
if(result)
@@ -1312,7 +1310,6 @@ static CURLcode pop3_setup_connection(struct connectdata *conn)
/* Clear the TLS upgraded flag */
conn->tls_upgraded = FALSE;
- data->state.path++; /* don't include the initial slash */
return CURLE_OK;
}
@@ -1387,7 +1384,7 @@ static CURLcode pop3_parse_url_path(struct connectdata *conn)
/* The POP3 struct is already initialised in pop3_connect() */
struct Curl_easy *data = conn->data;
struct POP3 *pop3 = data->req.protop;
- const char *path = data->state.path;
+ const char *path = &data->state.up.path[1]; /* skip leading path */
/* URL decode the path for the message ID */
return Curl_urldecode(data, path, 0, &pop3->id, NULL, TRUE);