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
I did this
I tried the following
and obtained this
I expected the following
I expected the
urle.schemevariable to return the same scheme as the url returned byurl_effective.curl/libcurl version
operating system
Windows