You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
curl_easy_setopt(curl, CURLOPT_URL, "example.com");
/* Perform the request, res will get the return code */res=curl_easy_perform(curl);
/* Check for errors */if(res!=CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
curl_easy_strerror(res));
if(!curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &url) &&url) {
printf("We got this from %s\n", url);
}
I expected the following output
We got this from http://example.com/
instead we get
We got this from example.com/
This behavior changed from after 7.61.1, which is the only older version I tested. I'm pretty sure the regression came in 7.62.0 when we modified the URL parser.
The URL extracted with CURLINFO_EFFECTIVE_URL was returned as given as
input in most cases, which made it not get a scheme prefixed like before
if the URL was given without one, and it didn't remove dotdot sequences
etc.
Added test case 1907 to verify that this now works as intended and as
before 7.62.0.
Regression introduced in 7.62.0
Reported-by: Christophe Dervieux
Fixes#4491
I did this
I expected the following output
We got this from http://example.com/
instead we get
We got this from example.com/
This behavior changed from after 7.61.1, which is the only older version I tested. I'm pretty sure the regression came in 7.62.0 when we modified the URL parser.
curl/libcurl version
current git master
operating system
all
Credits
Originally reported by @cderv Christophe Dervieux in: jeroen/curl#209
The text was updated successfully, but these errors were encountered: