Loading lib/url.c +16 −12 Original line number Diff line number Diff line Loading @@ -137,7 +137,9 @@ static long ConnectionKillOne(struct SessionHandle *data); static void conn_free(struct connectdata *conn); static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke); static CURLcode do_init(struct connectdata *conn); static CURLcode parse_url_userpass(struct SessionHandle *data, struct connectdata *conn, char *user, char *passwd); /* * Protocol table. */ Loading Loading @@ -3666,7 +3668,9 @@ static CURLcode findprotocol(struct SessionHandle *data, */ static CURLcode parseurlandfillconn(struct SessionHandle *data, struct connectdata *conn, bool *prot_missing) bool *prot_missing, char *user, char *passwd) { char *at; char *fragment; Loading @@ -3675,6 +3679,7 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data, int rc; char protobuf[16]; const char *protop; CURLcode result; *prot_missing = FALSE; Loading Loading @@ -3841,6 +3846,14 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data, path[0] = '/'; } /************************************************************* * Parse a user name and password in the URL and strip it out * of the host name *************************************************************/ result = parse_url_userpass(data, conn, user, passwd); if(result != CURLE_OK) return result; if(conn->host.name[0] == '[') { /* This looks like an IPv6 address literal. See if there is an address scope. */ Loading Loading @@ -4783,7 +4796,7 @@ static CURLcode create_conn(struct SessionHandle *data, conn->host.name = conn->host.rawalloc; conn->host.name[0] = 0; result = parseurlandfillconn(data, conn, &prot_missing); result = parseurlandfillconn(data, conn, &prot_missing, user, passwd); if(result != CURLE_OK) return result; Loading Loading @@ -4812,15 +4825,6 @@ static CURLcode create_conn(struct SessionHandle *data, data->change.url_alloc = TRUE; /* free this later */ } /************************************************************* * Parse a user name and password in the URL and strip it out * of the host name *************************************************************/ result = parse_url_userpass(data, conn, user, passwd); if(result != CURLE_OK) return result; /************************************************************* * If the protocol can't handle url query strings, then cut * of the unhandable part Loading Loading
lib/url.c +16 −12 Original line number Diff line number Diff line Loading @@ -137,7 +137,9 @@ static long ConnectionKillOne(struct SessionHandle *data); static void conn_free(struct connectdata *conn); static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke); static CURLcode do_init(struct connectdata *conn); static CURLcode parse_url_userpass(struct SessionHandle *data, struct connectdata *conn, char *user, char *passwd); /* * Protocol table. */ Loading Loading @@ -3666,7 +3668,9 @@ static CURLcode findprotocol(struct SessionHandle *data, */ static CURLcode parseurlandfillconn(struct SessionHandle *data, struct connectdata *conn, bool *prot_missing) bool *prot_missing, char *user, char *passwd) { char *at; char *fragment; Loading @@ -3675,6 +3679,7 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data, int rc; char protobuf[16]; const char *protop; CURLcode result; *prot_missing = FALSE; Loading Loading @@ -3841,6 +3846,14 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data, path[0] = '/'; } /************************************************************* * Parse a user name and password in the URL and strip it out * of the host name *************************************************************/ result = parse_url_userpass(data, conn, user, passwd); if(result != CURLE_OK) return result; if(conn->host.name[0] == '[') { /* This looks like an IPv6 address literal. See if there is an address scope. */ Loading Loading @@ -4783,7 +4796,7 @@ static CURLcode create_conn(struct SessionHandle *data, conn->host.name = conn->host.rawalloc; conn->host.name[0] = 0; result = parseurlandfillconn(data, conn, &prot_missing); result = parseurlandfillconn(data, conn, &prot_missing, user, passwd); if(result != CURLE_OK) return result; Loading Loading @@ -4812,15 +4825,6 @@ static CURLcode create_conn(struct SessionHandle *data, data->change.url_alloc = TRUE; /* free this later */ } /************************************************************* * Parse a user name and password in the URL and strip it out * of the host name *************************************************************/ result = parse_url_userpass(data, conn, user, passwd); if(result != CURLE_OK) return result; /************************************************************* * If the protocol can't handle url query strings, then cut * of the unhandable part Loading