summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-09-18 18:33:25 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-09-18 18:33:25 +0000
commitb556d6caeecc01d919c91b4d1408e8e718d6a3b3 (patch)
tree0cc735dbf382db873fbb2669e1e15749b093e508
parenta17a78c4773babb5f53d012ac83c9de80385d53a (diff)
downloadgnurl-b556d6caeecc01d919c91b4d1408e8e718d6a3b3.tar.gz
gnurl-b556d6caeecc01d919c91b4d1408e8e718d6a3b3.tar.bz2
gnurl-b556d6caeecc01d919c91b4d1408e8e718d6a3b3.zip
fixed bug report #462600, following a Location: when the initial URL didn't
have a protocol:// part did wrong
-rw-r--r--lib/url.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/url.c b/lib/url.c
index 81a238653..a3b7a025e 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1704,12 +1704,12 @@ static CURLcode Connect(struct SessionHandle *data,
} /* if not using proxy */
/*************************************************************
- * No protocol but proxy usage needs attention
+ * No protocol part in URL was used, add it!
*************************************************************/
- if((conn->protocol&PROT_MISSING) && data->change.proxy ) {
- /* We're guessing prefixes here and since we're told to use a proxy, we
- need to add the protocol prefix to the URL string before we continue!
- */
+ if(conn->protocol&PROT_MISSING) {
+ /* We're guessing prefixes here and if we're told to use a proxy or if
+ we're gonna follow a Location: later or... then we need the protocol
+ part added so that we have a valid URL. */
char *reurl;
reurl = aprintf("%s://%s", conn->protostr, data->change.url);