diff --git a/lib/urlapi.c b/lib/urlapi.c index baaf4af733..ef9ec4169f 100644 --- a/lib/urlapi.c +++ b/lib/urlapi.c @@ -1200,9 +1200,10 @@ static CURLUcode parseurl(const char *url, CURLU *u, unsigned int flags) path = u->path = Curl_dyn_ptr(&enc); } - if(!pathlen) { - /* there is no path left, unset */ + if(pathlen <= 1) { + /* there is no path left or just the slash, unset */ path = NULL; + pathlen = 0; } else { if(!u->path) {