Skip to content
Permalink
Browse files

url: Fix parsing for when 'file' is the default protocol. draft3

Squash me into previous draft

- Fail when a file:// drive letter is detected and not MSDOS/Windows.
  • Loading branch information...
jay committed Jan 11, 2017
1 parent 5857a56 commit 2d18159449e81494c3240859983c146dca5d88ec
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/url.c
@@ -4383,6 +4383,13 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data,
('A' <= path[0] && path[0] <= 'Z')) && path[1] == ':';
}

#if !defined(MSDOS) && !defined(WIN32)
if(path_has_drive) {
failf(data, "File drive letters are only accepted in MSDOS/Windows.");
return CURLE_URL_MALFORMAT;
}
#endif

protop = "file"; /* protocol string */
}
else {

0 comments on commit 2d18159

Please sign in to comment.
You can’t perform that action at this time.