Skip to content
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

7.62.0 breaks on redirects to unsupported protocol even if not followed #3210

Closed
bradking opened this issue Nov 1, 2018 · 2 comments
Closed

Comments

@bradking
Copy link
Contributor

bradking commented Nov 1, 2018

I did this

Build curl 7.62.0 from source with --without-ssl to disable https support. Then try to GET a http URL that redirects to https via 301, e.g.:

$ curl -v http://cmake.org
...
< HTTP/1.1 301 Moved Permanently
...
< Location: https://cmake.org/
...
* Closing connection 0
curl: (1) Unsupported protocol

It now fails because https is unsupported even though -L is not passed.

I expected the following

$ curl -v http://cmake.org
...
< HTTP/1.1 301 Moved Permanently
...
< Location: https://cmake.org/
...
* Connection #0 to host cmake.org left intact

curl/libcurl version

7.62.0. The failure bisects to commit 46e1640 from PR #3017.

@bagder
Copy link
Member

bagder commented Nov 1, 2018

Indeed - a side-effect of parsing the URL already in Curl_follow() and not allowing "unknown" URL schemes there...

bagder added a commit that referenced this issue Nov 1, 2018
When not actually following the redirect and the target URL is only
stored for later retrieval, curl always accepted "non-supported"
schemes. This was a regression from 46e1640.

Reported-by: Brad King
Fixes #3210
@bagder bagder closed this as completed in 2c5ec33 Nov 2, 2018
@bradking
Copy link
Contributor Author

bradking commented Nov 2, 2018

Confirmed, thanks!

@lock lock bot locked as resolved and limited conversation to collaborators Jan 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants