URL: tolerate backslash after drive letter for FILE:

... as in "file://c:\some\path\curl.out"

Reviewed-by: Matthew Kerwin
Closes #2154
This commit is contained in:
Jan-E 2017-12-05 10:10:59 +01:00 committed by Daniel Stenberg
parent 24dcd74667
commit b261c44e8c
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 1 additions and 1 deletions

View File

@ -2033,7 +2033,7 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data,
((('a' <= (str)[0] && (str)[0] <= 'z') || \
('A' <= (str)[0] && (str)[0] <= 'Z')) && \
((str)[1] == ':' || (str)[1] == '|') && \
((str)[2] == '/' || (str)[2] == 0))
((str)[2] == '/' || (str)[2] == '\\' || (str)[2] == 0))
/* Don't mistake a drive letter for a scheme if the default protocol is file.
curld --proto-default file c:/foo/bar.txt */