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
curl -L --max-redir 0 -w '%{url_effective}\n%{redirect_url}\n' -s -o /dev/null 'https://httpbin.org/redirect/1'
and
curl -w '%{url_effective}\n%{redirect_url}\n' -s -o /dev/null 'https://httpbin.org/redirect/1'
Them to be the same. Although the documentation does mention it doesn't work with -L, if curl stops following redirects because it hits --max-redir it makes sense to me that the final redirect response should put its url in %{redirect_url}
-L
--max-redir
%{redirect_url}
(I guess this might be feature request?)
curl 7.54.0 (x86_64-apple-darwin16.5.0) libcurl/7.54.0 SecureTransport zlib/1.2.8 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp Features: IPv6 Largefile NTLM NTLM_WB SSL libz UnixSockets
OS X
Thanks
The text was updated successfully, but these errors were encountered:
redirect: store the "would redirect to" URL when max redirs is reached
cd9652d
Test 1261 added to verify. Reported-by: Lloyd Fournier Fixes #1489
c462cd1
bba5907
No branches or pull requests
I did this
and
I expected the following
Them to be the same. Although the documentation does mention it doesn't work with
-L
, if curl stops following redirects because it hits--max-redir
it makes sense to me that the final redirect response should put its url in%{redirect_url}
(I guess this might be feature request?)
curl/libcurl version
operating system
OS X
Thanks
The text was updated successfully, but these errors were encountered: