Skip to content
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

Write out variable urle.scheme is not returning the correct scheme as in url_effective #14550

Closed
GlassGruber opened this issue Aug 15, 2024 · 0 comments
Assignees

Comments

@GlassGruber
Copy link

I did this

I tried the following

curl --location -Is -o /dev/null -w "%{num_redirects} %{url_effective} %{urle.scheme}" http://www.wikipedia.org

curl --location -Is -o /dev/null -w "%{num_redirects} %{url_effective} %{urle.scheme}" https://www.wikipedia.org

curl --location -Is -o /dev/null -w "%{num_redirects} %{url_effective} %{urle.scheme}" https://http.badssl.org

and obtained this

1 https://www.wikipedia.org/ http     # wrong urle.schema https expected

0 https://www.wikipedia.org/ https    # correct but no change of schema occurred

1 http://http.badssl.com/ https       # wrong urle.schema http expected

I expected the following

I expected the urle.scheme variable to return the same scheme as the url returned by url_effective.

curl/libcurl version

curl 8.9.1 (x86_64-w64-mingw32) libcurl/8.9.1 LibreSSL/3.9.2 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 WinIDN libpsl/0.21.5 libssh2/1.11.0 nghttp2/1.62.1 ngtcp2/1.6.0 nghttp3/1.4.0
Release-Date: 2024-07-31
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL SSPI threadsafe UnixSockets zstd

operating system

Windows

@bagder bagder self-assigned this Aug 15, 2024
bagder added a commit that referenced this issue Aug 15, 2024
urle.scheme, urle.user, urle.password and urle.options mistakenly
operated on the original URL instead of the *effective* (last) URL.

Add test 474 to verify.

Reported-by: Gruber Glass
Fixes #14550
@bagder bagder closed this as completed in 5603204 Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants