diff --git a/lib/http.c b/lib/http.c index d736dfdfadf7bca1b6711d3e7c7a6164f7ee473f..bfef5cecf204f5e95db73c31d0383d4488c272a3 100644 --- a/lib/http.c +++ b/lib/http.c @@ -748,8 +748,8 @@ CURLcode Curl_http(struct connectdata *conn) start++; ptr = start; /* start host-scanning here */ - /* scan through the string to find the end */ - while(*ptr && !isspace((int)*ptr)) + /* scan through the string to find the end (space or colon) */ + while(*ptr && !isspace((int)*ptr) && !(':'==*ptr)) ptr++; if(ptr != start) {