aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/url.c5
-rw-r--r--tests/data/test12132
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index eaa282a04..2fd0a1283 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -5511,6 +5511,7 @@ static CURLcode create_conn(struct SessionHandle *data,
we're gonna follow a Location: later or... then we need the protocol
part added so that we have a valid URL. */
char *reurl;
+ char *ch_lower;
reurl = aprintf("%s://%s", conn->handler->scheme, data->change.url);
@@ -5519,6 +5520,10 @@ static CURLcode create_conn(struct SessionHandle *data,
goto out;
}
+ /* Change protocol prefix to lower-case */
+ for(ch_lower = reurl; *ch_lower != ':'; ch_lower++)
+ *ch_lower = (char)TOLOWER(*ch_lower);
+
if(data->change.url_alloc) {
Curl_safefree(data->change.url);
data->change.url_alloc = FALSE;
diff --git a/tests/data/test1213 b/tests/data/test1213
index 729a7034d..4f22f0d92 100644
--- a/tests/data/test1213
+++ b/tests/data/test1213
@@ -43,7 +43,7 @@ HTTP with proxy and host-only URL
^User-Agent:.*
</strip>
<protocol>
-GET HTTP://we.want.that.site.com.1213/ HTTP/1.1
+GET http://we.want.that.site.com.1213/ HTTP/1.1
Host: we.want.that.site.com.1213
Accept: */*
Proxy-Connection: Keep-Alive