Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
URL parser: userinfo breaks the protocol guessing when no scheme is given #4856
I did this
I expected the following
That curl would try to use FTP to the site and use the given name and password for login. Instead it made a HTTP request to the given host.
The reason for this mistake is that the "protocol guessing" is done on the host name part when the credentials are still prepended! This does also make something like
I have extended test 1560 with these two examples and will work on a PR.
In the "scheme-less" parsing case, we need to strip off credentials first before we guess scheme based on the host name! Fixes #4856