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

Comments

Projects
None yet
2 participants
@bradking
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

This comment has been minimized.

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

Curl_follow: accept non-supported schemes for "fake" redirects
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 added the regression label Nov 1, 2018

@bagder bagder closed this in 2c5ec33 Nov 2, 2018

@bradking

This comment has been minimized.

Contributor

bradking commented Nov 2, 2018

Confirmed, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment