aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index 33afb0108..9b0006007 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2466,6 +2466,10 @@ static CURLcode CreateConnection(struct SessionHandle *data,
*tmp=0; /* now cut off the hostname at the ? */
}
+ else if(!conn->path[0]) {
+ /* if there's no path set, use a single slash */
+ strcpy(conn->path, "/");
+ }
/* If the URL is malformatted (missing a '/' after hostname before path) we
* insert a slash here. The only letter except '/' we accept to start a path