Skip to content
Snippets Groups Projects
Commit 6c6e5522 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

redirect from a bad url such as "www.com?moo=foo" to an absolute path didn't

work, as reported by John McGowan
parent aff9a817
No related branches found
No related tags found
No related merge requests found
......@@ -1666,6 +1666,15 @@ CURLcode Curl_follow(struct SessionHandle *data,
pathsep = strchr(protsep, '/');
if(pathsep)
*pathsep=0;
else {
/* There was no slash. Now, since we might be operating on a badly
formatted URL, such as "http://www.url.com?id=2380" which doesn't
use a slash separator as it is supposed to, we need to check for a
?-letter as well! */
pathsep = strchr(protsep, '?');
if(pathsep)
*pathsep=0;
}
}
/* If the new part contains a space, this is a mighty stupid redirect
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment