url: use the URL API internally as well

... to make it a truly unified URL parser.

Closes #3017
This commit is contained in:
Daniel Stenberg 2018-09-14 23:33:28 +02:00
parent f078361c0e
commit 46e164069d
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
22 changed files with 386 additions and 928 deletions

View file

@ -1441,7 +1441,6 @@ static CURLcode smtp_regular_transfer(struct connectdata *conn,
static CURLcode smtp_setup_connection(struct connectdata *conn)
{
struct Curl_easy *data = conn->data;
CURLcode result;
/* Clear the TLS upgraded flag */
@ -1452,8 +1451,6 @@ static CURLcode smtp_setup_connection(struct connectdata *conn)
if(result)
return result;
data->state.path++; /* don't include the initial slash */
return CURLE_OK;
}
@ -1507,7 +1504,7 @@ static CURLcode smtp_parse_url_path(struct connectdata *conn)
/* The SMTP struct is already initialised in smtp_connect() */
struct Curl_easy *data = conn->data;
struct smtp_conn *smtpc = &conn->proto.smtpc;
const char *path = data->state.path;
const char *path = &data->state.up.path[1]; /* skip leading path */
char localhost[HOSTNAME_MAX + 1];
/* Calculate the path if necessary */