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.
*/
*/
static CURLcode parseurlandfillconn(struct SessionHandle *data,
struct connectdata *conn,
- bool *prot_missing)
+ bool *prot_missing,
+ char *user,
+ char *passwd)
{
char *at;
char *fragment;
int rc;
char protobuf[16];
const char *protop;
+ CURLcode result;
*prot_missing = FALSE;
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. */
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;
}
/*************************************************************
- * 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
*************************************************************/