-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix file://c:\some\path\curl.out #2154
Conversation
I have read the remark in #1187 (comment) that backslashes in URL's are forbidden by both [RFC1738] and [RFC3986]. Hence, it would be better to fix the issue in PHP. @weltling intends to do that for the actively maintained PHP versions (PHP 7.1 and PHP 7.2), but the fix will not be backported to versions like PHP 5.6 (which will receive security fixes only). If this PR is merged users of PHP 5.6 can also enjoy the enhancements of the latest curl version. |
/cc @phluid61 |
tl,dr: LGTM I will be honest, I wasn't sure how to approach the issue of backslashes when I submitted #2110. Some observations:
I think 3 and 4 above are enough justification for accepting the patch. |
Thanks for the review.
@bagder Could you merge it? |
Merged, thanks! |
... as in "file://c:\some\path\curl.out" Reviewed-by: Matthew Kerwin Closes curl#2154
Pulls in this fix curl/curl#2154 Fixes resource retrieval in Windows
Pulls in this curl fix curl/curl#2154 to fix resource retrieval in Windows
Pulls in curl fix curl/curl#2154 to fix resource retrieval in Windows
Pulls in curl fix curl/curl#2154 to fix resource retrieval in Windows
Sequel to #1187 (comment)
The issue is essentially the same as in the opening post of #1187 (comment)
file://c:\some\path\curl.out
is rejected wih error message:
file://c:/some/path/curl.out
is accepted. This is apparently intentional, according to the comment in https://github.com/curl/curl/blob/master/lib/url.c#L2121
PHP uses the backslash format for file:// URL's. This PR aims to include URL's like file://c:\some\path\curl.out as well.