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

No method matching sslupgrade #1172

Closed
shikil opened this issue Apr 23, 2024 · 18 comments
Closed

No method matching sslupgrade #1172

shikil opened this issue Apr 23, 2024 · 18 comments

Comments

@shikil
Copy link

shikil commented Apr 23, 2024

Please specify the following versions when submitting a bug report:

  • Julia 1.10.2
  • HTTP.jl 1.10.6
  • MbedTLS.jl 1.1.9

After upgrading HTTP.jl from 1.10.5 to 1.10.6, I get the following error message.

Underlying error:
MethodError: no method matching sslupgrade(::Nothing, ::HTTP.Connections.Connection{Sockets.TCPSocket}, ::SubString{String}; readtimeout::Int64, iofunction::Nothing, decompress::Nothing, verbose::Int64)

Closest candidates are:
  sslupgrade(::Type{IOType}, ::HTTP.Connections.Connection{T}, ::AbstractString; pool, require_ssl_verification, keepalive, readtimeout, kw...) where {T, IOType}
   @ HTTP ~/.julia/packages/HTTP/PnoHb/src/Connections.jl:613

Stacktrace:
  [1] (::HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}})(req::HTTP.Messages.Request; proxy::String, socket_type::Type, socket_type_tls::Nothing, readtimeout::Int64, connect_timeout::Int64, logerrors::Bool, logtag::Nothing, kw::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
    @ HTTP.ConnectionRequest ~/.julia/packages/HTTP/PnoHb/src/clientlayers/ConnectionRequest.jl:140
  [2] connections
    @ ~/.julia/packages/HTTP/PnoHb/src/clientlayers/ConnectionRequest.jl:58 [inlined]
  [3] (::Base.var"#96#98"{Base.var"#96#97#99"{ExponentialBackOff, HTTP.RetryRequest.var"#2#5"{Int64, typeof(HTTP.RetryRequest.FALSE), HTTP.Messages.Request, Base.RefValue{Int64}}, HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}})(args::HTTP.Messages.Request; kwargs::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
    @ Base ./error.jl:296
  [4] (::HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}})(req::HTTP.Messages.Request; retry::Bool, retries::Int64, retry_delays::ExponentialBackOff, retry_check::Function, retry_non_idempotent::Bool, kw::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
    @ HTTP.RetryRequest ~/.julia/packages/HTTP/PnoHb/src/clientlayers/RetryRequest.jl:75
  [5] manageretries
    @ ~/.julia/packages/HTTP/PnoHb/src/clientlayers/RetryRequest.jl:30 [inlined]
  [6] (::HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}})(req::HTTP.Messages.Request; cookies::Bool, cookiejar::HTTP.Cookies.CookieJar, kw::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
    @ HTTP.CookieRequest ~/.julia/packages/HTTP/PnoHb/src/clientlayers/CookieRequest.jl:42
  [7] managecookies
    @ ~/.julia/packages/HTTP/PnoHb/src/clientlayers/CookieRequest.jl:19 [inlined]
  [8] (::HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}})(req::HTTP.Messages.Request; iofunction::Nothing, decompress::Nothing, basicauth::Bool, detect_content_type::Bool, canonicalize_headers::Bool, kw::@Kwargs{verbose::Int64})
    @ HTTP.HeadersRequest ~/.julia/packages/HTTP/PnoHb/src/clientlayers/HeadersRequest.jl:71
  [9] defaultheaders
    @ ~/.julia/packages/HTTP/PnoHb/src/clientlayers/HeadersRequest.jl:14 [inlined]
 [10] (::HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}})(req::HTTP.Messages.Request; redirect::Bool, redirect_limit::Int64, redirect_method::Nothing, forwardheaders::Bool, response_stream::Nothing, kw::@Kwargs{verbose::Int64})
    @ HTTP.RedirectRequest ~/.julia/packages/HTTP/PnoHb/src/clientlayers/RedirectRequest.jl:25
 [11] redirects
    @ ~/.julia/packages/HTTP/PnoHb/src/clientlayers/RedirectRequest.jl:14 [inlined]
 [12] (::HTTP.MessageRequest.var"#makerequest#3"{HTTP.MessageRequest.var"#makerequest#1#4"{HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}}}})(method::String, url::URIs.URI, headers::Nothing, body::Vector{UInt8}; copyheaders::Bool, response_stream::Nothing, http_version::HTTP.Strings.HTTPVersion, verbose::Int64, kw::@Kwargs{})
    @ HTTP.MessageRequest ~/.julia/packages/HTTP/PnoHb/src/clientlayers/MessageRequest.jl:35
 [13] makerequest
    @ ~/.julia/packages/HTTP/PnoHb/src/clientlayers/MessageRequest.jl:24 [inlined]
 [14] request(stack::HTTP.MessageRequest.var"#makerequest#3"{HTTP.MessageRequest.var"#makerequest#1#4"{HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}}}}, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::Nothing; headers::Nothing, body::Vector{UInt8}, query::Nothing, kw::@Kwargs{})
    @ HTTP ~/.julia/packages/HTTP/PnoHb/src/HTTP.jl:457
 [15] request(stack::Function, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::Nothing)
    @ HTTP ~/.julia/packages/HTTP/PnoHb/src/HTTP.jl:455
 [16] #request#20
    @ ~/.julia/packages/HTTP/PnoHb/src/HTTP.jl:315 [inlined]
 [17] request (repeats 2 times)
    @ ~/.julia/packages/HTTP/PnoHb/src/HTTP.jl:313 [inlined]
 [18] get
    @ ~/.julia/packages/HTTP/PnoHb/src/HTTP.jl:518 [inlined]


@fredrikekre
Copy link
Member

Probably #1106 then, cc @cmcaine

@cmcaine
Copy link
Contributor

cmcaine commented Apr 23, 2024

Can you please provide a small, self-contained script that emits this error, @shikil ?

@yuba316
Copy link

yuba316 commented Apr 23, 2024

yes, the most recent update introduced this bug:
socket_type_tls::Union{Nothing, Type}=nothing

And it break the function Athena.start_query_execution in AWS.jl

@cmcaine
Copy link
Contributor

cmcaine commented Apr 23, 2024

Thanks for the information, but that's not a runnable example for me.

The code you linked is intended to replace the default value (nothing) with the old default type (SOCKET_TYPE_TLS[]) if the caller has not specified an sslconfig. I appreciate that my implementation is probably buggy, given this error report, but I don't see a mistake in the code.

@felipenoris
Copy link

felipenoris commented Apr 24, 2024

I'm hitting this same error after Pkg.update(). I'll diagnose this further, but my best guess at this moment is that any "send request" to a HTTPS server will trigger this.

@shikil
Copy link
Author

shikil commented Apr 24, 2024

using HTTP
HTTP.get("https://data.etabus.gov.hk/")

@felipenoris
Copy link

On a fresh Julia v1.10.2 install. I'm running behind a proxy.

(@v1.10) pkg> add HTTP
   Resolving package versions...
    Updating `~/.julia/environments/v1.10/Project.toml`
  [cd3eb016] + HTTP v1.10.6
    Updating `~/.julia/environments/v1.10/Manifest.toml`
  [d1d4a3ce] + BitFlags v0.1.8
  [944b1d66] + CodecZlib v0.7.4
  [f0e56b4a] + ConcurrentUtilities v2.4.1
  [460bff9d] + ExceptionUnwrapping v0.1.10
  [cd3eb016] + HTTP v1.10.6
  [692b3bcd] + JLLWrappers v1.5.0
  [e6f89c97] + LoggingExtras v1.0.3
  [739be429] + MbedTLS v1.1.9
  [4d8831e6] + OpenSSL v1.4.3
  [21216c6a] + Preferences v1.4.3
  [777ac1f9] + SimpleBufferStream v1.1.0
  [3bb67fe8] + TranscodingStreams v0.10.7
  [5c2747f8] + URIs v1.5.1
  [458c3c95] + OpenSSL_jll v3.0.13+1
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [b77e0a4c] + InteractiveUtils
  [8f399da3] + Libdl
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [ca575930] + NetworkOptions v1.2.0
  [de0858da] + Printf
  [9a3f8284] + Random
  [ea8e919c] + SHA v0.7.0
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [fa267f1f] + TOML v1.0.3
  [8dfed614] + Test
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  [c8ffd9c3] + MbedTLS_jll v2.28.2+1
  [14a3606d] + MozillaCACerts_jll v2023.1.10
  [83775a58] + Zlib_jll v1.2.13+1
Precompiling project...
  15 dependencies successfully precompiled in 10 seconds. 2 already precompiled.

julia> using HTTP

julia> HTTP.get("https://data.etabus.gov.hk/")
ERROR: HTTP.RequestError:
HTTP.Request:
HTTP.Messages.Request:
"""
GET / HTTP/1.1
Host: data.etabus.gov.hk
Accept: */*
User-Agent: HTTP.jl/1.10.2
Content-Length: 0
Accept-Encoding: gzip
Proxy-Authorization: ******

"""Underlying error:
MethodError: no method matching sslupgrade(::Nothing, ::HTTP.Connections.Connection{Sockets.TCPSocket}, ::SubString{String}; readtimeout::Int64, iofunction::Nothing, decompress::Nothing, verbose::Int64)

Closest candidates are:
  sslupgrade(::Type{IOType}, ::HTTP.Connections.Connection{T}, ::AbstractString; pool, require_ssl_verification, keepalive, readtimeout, kw...) where {T, IOType}
   @ HTTP ~/.julia/packages/HTTP/PnoHb/src/Connections.jl:613

Stacktrace:
  [1] (::HTTP.ConnectionRequest.var"#connections#4"{…})(req::HTTP.Messages.Request; proxy::String, socket_type::Type, socket_type_tls::Nothing, readtimeout::Int64, connect_timeout::Int64, logerrors::Bool, logtag::Nothing, kw::@Kwargs{…})
    @ HTTP.ConnectionRequest ~/.julia/packages/HTTP/PnoHb/src/clientlayers/ConnectionRequest.jl:140
  [2] connections
    @ ~/.julia/packages/HTTP/PnoHb/src/clientlayers/ConnectionRequest.jl:58 [inlined]
  [3] (::Base.var"#96#98"{Base.var"#96#97#99"{…}})(args::HTTP.Messages.Request; kwargs::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
    @ Base ./error.jl:296
  [4] (::HTTP.RetryRequest.var"#manageretries#3"{…})(req::HTTP.Messages.Request; retry::Bool, retries::Int64, retry_delays::ExponentialBackOff, retry_check::Function, retry_non_idempotent::Bool, kw::@Kwargs{…})
    @ HTTP.RetryRequest ~/.julia/packages/HTTP/PnoHb/src/clientlayers/RetryRequest.jl:75
  [5] manageretries
    @ ~/.julia/packages/HTTP/PnoHb/src/clientlayers/RetryRequest.jl:30 [inlined]
  [6] (::HTTP.CookieRequest.var"#managecookies#4"{…})(req::HTTP.Messages.Request; cookies::Bool, cookiejar::HTTP.Cookies.CookieJar, kw::@Kwargs{…})
    @ HTTP.CookieRequest ~/.julia/packages/HTTP/PnoHb/src/clientlayers/CookieRequest.jl:42
  [7] managecookies
    @ ~/.julia/packages/HTTP/PnoHb/src/clientlayers/CookieRequest.jl:19 [inlined]
  [8] (::HTTP.HeadersRequest.var"#defaultheaders#2"{…})(req::HTTP.Messages.Request; iofunction::Nothing, decompress::Nothing, basicauth::Bool, detect_content_type::Bool, canonicalize_headers::Bool, kw::@Kwargs{…})
    @ HTTP.HeadersRequest ~/.julia/packages/HTTP/PnoHb/src/clientlayers/HeadersRequest.jl:71
  [9] defaultheaders
    @ ~/.julia/packages/HTTP/PnoHb/src/clientlayers/HeadersRequest.jl:14 [inlined]
 [10] (::HTTP.RedirectRequest.var"#redirects#3"{…})(req::HTTP.Messages.Request; redirect::Bool, redirect_limit::Int64, redirect_method::Nothing, forwardheaders::Bool, response_stream::Nothing, kw::@Kwargs{…})
    @ HTTP.RedirectRequest ~/.julia/packages/HTTP/PnoHb/src/clientlayers/RedirectRequest.jl:25
 [11] redirects
    @ ~/.julia/packages/HTTP/PnoHb/src/clientlayers/RedirectRequest.jl:14 [inlined]
 [12] (::HTTP.MessageRequest.var"#makerequest#3"{…})(method::String, url::URIs.URI, headers::Nothing, body::Vector{…}; copyheaders::Bool, response_stream::Nothing, http_version::HTTP.Strings.HTTPVersion, verbose::Int64, kw::@Kwargs{})
    @ HTTP.MessageRequest ~/.julia/packages/HTTP/PnoHb/src/clientlayers/MessageRequest.jl:35
 [13] makerequest
    @ ~/.julia/packages/HTTP/PnoHb/src/clientlayers/MessageRequest.jl:24 [inlined]
 [14] request(stack::HTTP.MessageRequest.var"#makerequest#3"{…}, method::String, url::String, h::Nothing, b::Vector{…}, q::Nothing; headers::Nothing, body::Vector{…}, query::Nothing, kw::@Kwargs{})
    @ HTTP ~/.julia/packages/HTTP/PnoHb/src/HTTP.jl:457
 [15] request(stack::Function, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::Nothing)
    @ HTTP ~/.julia/packages/HTTP/PnoHb/src/HTTP.jl:455
 [16] #request#20
    @ ~/.julia/packages/HTTP/PnoHb/src/HTTP.jl:315 [inlined]
 [17] request (repeats 2 times)
    @ ~/.julia/packages/HTTP/PnoHb/src/HTTP.jl:313 [inlined]
 [18] get(a::String)
    @ HTTP ~/.julia/packages/HTTP/PnoHb/src/HTTP.jl:518
 [19] top-level scope
    @ REPL[4]:1

caused by: MethodError: no method matching sslupgrade(::Nothing, ::HTTP.Connections.Connection{Sockets.TCPSocket}, ::SubString{String}; readtimeout::Int64, iofunction::Nothing, decompress::Nothing, verbose::Int64)

Closest candidates are:
  sslupgrade(::Type{IOType}, ::HTTP.Connections.Connection{T}, ::AbstractString; pool, require_ssl_verification, keepalive, readtimeout, kw...) where {T, IOType}
   @ HTTP ~/.julia/packages/HTTP/PnoHb/src/Connections.jl:613

Stacktrace:
  [1] (::HTTP.ConnectionRequest.var"#connections#4"{…})(req::HTTP.Messages.Request; proxy::String, socket_type::Type, socket_type_tls::Nothing, readtimeout::Int64, connect_timeout::Int64, logerrors::Bool, logtag::Nothing, kw::@Kwargs{…})
    @ HTTP.ConnectionRequest ~/.julia/packages/HTTP/PnoHb/src/clientlayers/ConnectionRequest.jl:113
  [2] connections
    @ ~/.julia/packages/HTTP/PnoHb/src/clientlayers/ConnectionRequest.jl:58 [inlined]
  [3] (::Base.var"#96#98"{Base.var"#96#97#99"{…}})(args::HTTP.Messages.Request; kwargs::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
    @ Base ./error.jl:296
  [4] (::HTTP.RetryRequest.var"#manageretries#3"{…})(req::HTTP.Messages.Request; retry::Bool, retries::Int64, retry_delays::ExponentialBackOff, retry_check::Function, retry_non_idempotent::Bool, kw::@Kwargs{…})
    @ HTTP.RetryRequest ~/.julia/packages/HTTP/PnoHb/src/clientlayers/RetryRequest.jl:75
  [5] manageretries
    @ ~/.julia/packages/HTTP/PnoHb/src/clientlayers/RetryRequest.jl:30 [inlined]
  [6] (::HTTP.CookieRequest.var"#managecookies#4"{…})(req::HTTP.Messages.Request; cookies::Bool, cookiejar::HTTP.Cookies.CookieJar, kw::@Kwargs{…})
    @ HTTP.CookieRequest ~/.julia/packages/HTTP/PnoHb/src/clientlayers/CookieRequest.jl:42
  [7] managecookies
    @ ~/.julia/packages/HTTP/PnoHb/src/clientlayers/CookieRequest.jl:19 [inlined]
  [8] (::HTTP.HeadersRequest.var"#defaultheaders#2"{…})(req::HTTP.Messages.Request; iofunction::Nothing, decompress::Nothing, basicauth::Bool, detect_content_type::Bool, canonicalize_headers::Bool, kw::@Kwargs{…})
    @ HTTP.HeadersRequest ~/.julia/packages/HTTP/PnoHb/src/clientlayers/HeadersRequest.jl:71
  [9] defaultheaders
    @ ~/.julia/packages/HTTP/PnoHb/src/clientlayers/HeadersRequest.jl:14 [inlined]
 [10] (::HTTP.RedirectRequest.var"#redirects#3"{…})(req::HTTP.Messages.Request; redirect::Bool, redirect_limit::Int64, redirect_method::Nothing, forwardheaders::Bool, response_stream::Nothing, kw::@Kwargs{…})
    @ HTTP.RedirectRequest ~/.julia/packages/HTTP/PnoHb/src/clientlayers/RedirectRequest.jl:25
 [11] redirects
    @ ~/.julia/packages/HTTP/PnoHb/src/clientlayers/RedirectRequest.jl:14 [inlined]
 [12] (::HTTP.MessageRequest.var"#makerequest#3"{…})(method::String, url::URIs.URI, headers::Nothing, body::Vector{…}; copyheaders::Bool, response_stream::Nothing, http_version::HTTP.Strings.HTTPVersion, verbose::Int64, kw::@Kwargs{})
    @ HTTP.MessageRequest ~/.julia/packages/HTTP/PnoHb/src/clientlayers/MessageRequest.jl:35
 [13] makerequest
    @ ~/.julia/packages/HTTP/PnoHb/src/clientlayers/MessageRequest.jl:24 [inlined]
 [14] request(stack::HTTP.MessageRequest.var"#makerequest#3"{…}, method::String, url::String, h::Nothing, b::Vector{…}, q::Nothing; headers::Nothing, body::Vector{…}, query::Nothing, kw::@Kwargs{})
    @ HTTP ~/.julia/packages/HTTP/PnoHb/src/HTTP.jl:457
 [15] request(stack::Function, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::Nothing)
    @ HTTP ~/.julia/packages/HTTP/PnoHb/src/HTTP.jl:455
 [16] #request#20
    @ ~/.julia/packages/HTTP/PnoHb/src/HTTP.jl:315 [inlined]
 [17] request (repeats 2 times)
    @ ~/.julia/packages/HTTP/PnoHb/src/HTTP.jl:313 [inlined]
 [18] get(a::String)
    @ HTTP ~/.julia/packages/HTTP/PnoHb/src/HTTP.jl:518
 [19] top-level scope
    @ REPL[4]:1
Some type information was truncated. Use `show(err)` to see complete types.

julia>

@felipenoris
Copy link

Downgrading HTTP to v1.10.5, it works.

julia> Pkg.pin(PackageSpec(name="HTTP", version="1.10.5"))
   Resolving package versions...
    Updating `~/work/tmp/prj/Project.toml`
⌃ [cd3eb016] ↓ HTTP v1.10.6 ⇒ v1.10.5 ⚲
    Updating `~/work/tmp/prj/Manifest.toml`
⌃ [cd3eb016] ↓ HTTP v1.10.6 ⇒ v1.10.5 ⚲
        Info Packages marked with ⌃ have new versions available and may be upgradable.
Precompiling project...
  1 dependency successfully precompiled in 5 seconds. 16 already precompiled.

julia> import HTTP

julia> HTTP.get("https://data.etabus.gov.hk/")
HTTP.Messages.Response:
"""
HTTP/1.1 200 OK
Date: Thu, 25 Apr 2024 18:43:55 GMT
Content-Length: 0
Connection: keep-alive
Access-Control-Allow-Origin: *
X-Content-Type-Options: nosniff
x-azure-ref: 20240425T184354Z-r1f4496ffcc7dqmr522m8cch6g0000000a40000000009a8v
X-Cache: CONFIG_NOCACHE
Accept-Ranges: bytes

"""

@cmcaine
Copy link
Contributor

cmcaine commented May 2, 2024

I created a branch with new tests for this and I have not been able to reproduce the issue on Julia 1.9.2 or 1.10.2.

See this branch for the commit that adds the tests. Maybe you can try pulling in that branch as your HTTP.jl and running the tests?

https://github.com/cmcaine/HTTP.jl/tree/fix-1172

And here's some manual testing using the current #master version of HTTP.jl:

julia> using HTTP

julia> HTTP.get("https://data.etabus.gov.hk/")
HTTP.Messages.Response:
"""
HTTP/1.1 200 OK
Date: CENSORED
Content-Length: 0
Connection: keep-alive
Access-Control-Allow-Origin: *
X-Content-Type-Options: nosniff
x-azure-ref: CENSORED
X-Cache: CONFIG_NOCACHE
Accept-Ranges: bytes

"""

julia> versioninfo()
Julia Version 1.9.2
Commit e4ee485e909 (2023-07-05 09:39 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 12 × 12th Gen Intel(R) Core(TM) i5-12400F
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, alderlake)
  Threads: 1 on 12 virtual cores

(HTTP) pkg> status
Project HTTP v1.10.6
Status `~/.julia/dev/HTTP/Project.toml`
  [944b1d66] CodecZlib v0.7.4
  [f0e56b4a] ConcurrentUtilities v2.4.1
  [460bff9d] ExceptionUnwrapping v0.1.10
  [e6f89c97] LoggingExtras v1.0.3
  [739be429] MbedTLS v1.1.9
  [4d8831e6] OpenSSL v1.4.3
  [777ac1f9] SimpleBufferStream v1.1.0
  [5c2747f8] URIs v1.5.1
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [56ddb016] Logging
  [ca575930] NetworkOptions v1.2.0
  [9a3f8284] Random
  [6462fe0b] Sockets
  [cf7118a7] UUIDs

@shikil
Copy link
Author

shikil commented May 3, 2024

Same error in Julia 1.10.3, I also tested behind proxy, so it may be cause

@felipenoris
Copy link

Using branch https://github.com/cmcaine/HTTP.jl/tree/fix-1172 I got the following error.

julia> HTTP.get("https://data.etabus.gov.hk/")
ERROR: HTTP.RequestError:
HTTP.Request:
HTTP.Messages.Request:
"""
GET / HTTP/1.1
Host: data.etabus.gov.hk
Accept: */*
User-Agent: HTTP.jl/1.10.2
Content-Length: 0
Accept-Encoding: gzip
Proxy-Authorization: ******

"""Underlying error:
MethodError: no method matching sslupgrade(::Nothing, ::HTTP.Connections.Connection{Sockets.TCPSocket}, ::SubString{String}; readtimeout::Int64, iofunction::Nothing, decompress::Nothing, verbose::Int64)

Closest candidates are:
  sslupgrade(::Type{IOType}, ::HTTP.Connections.Connection{T}, ::AbstractString; pool, require_ssl_verification, keepalive, readtimeout, kw...) where {T, IOType}
   @ HTTP ~/work/tmp/HTTP.jl/src/Connections.jl:613

Stacktrace:
  [1] (::HTTP.ConnectionRequest.var"#connections#4"{…})(req::HTTP.Messages.Request; proxy::String, socket_type::Type, socket_type_tls::Nothing, readtimeout::Int64, connect_timeout::Int64, logerrors::Bool, logtag::Nothing, kw::@Kwargs{…})
    @ HTTP.ConnectionRequest ~/work/tmp/HTTP.jl/src/clientlayers/ConnectionRequest.jl:140
  [2] connections
    @ ~/work/tmp/HTTP.jl/src/clientlayers/ConnectionRequest.jl:58 [inlined]
  [3] (::Base.var"#96#98"{Base.var"#96#97#99"{…}})(args::HTTP.Messages.Request; kwargs::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
    @ Base ./error.jl:296
  [4] (::HTTP.RetryRequest.var"#manageretries#3"{…})(req::HTTP.Messages.Request; retry::Bool, retries::Int64, retry_delays::ExponentialBackOff, retry_check::Function, retry_non_idempotent::Bool, kw::@Kwargs{…})
    @ HTTP.RetryRequest ~/work/tmp/HTTP.jl/src/clientlayers/RetryRequest.jl:75
  [5] manageretries
    @ ~/work/tmp/HTTP.jl/src/clientlayers/RetryRequest.jl:30 [inlined]
  [6] (::HTTP.CookieRequest.var"#managecookies#4"{…})(req::HTTP.Messages.Request; cookies::Bool, cookiejar::HTTP.Cookies.CookieJar, kw::@Kwargs{…})
    @ HTTP.CookieRequest ~/work/tmp/HTTP.jl/src/clientlayers/CookieRequest.jl:42
  [7] managecookies
    @ ~/work/tmp/HTTP.jl/src/clientlayers/CookieRequest.jl:19 [inlined]
  [8] (::HTTP.HeadersRequest.var"#defaultheaders#2"{…})(req::HTTP.Messages.Request; iofunction::Nothing, decompress::Nothing, basicauth::Bool, detect_content_type::Bool, canonicalize_headers::Bool, kw::@Kwargs{…})
    @ HTTP.HeadersRequest ~/work/tmp/HTTP.jl/src/clientlayers/HeadersRequest.jl:71
  [9] defaultheaders
    @ ~/work/tmp/HTTP.jl/src/clientlayers/HeadersRequest.jl:14 [inlined]
 [10] (::HTTP.RedirectRequest.var"#redirects#3"{…})(req::HTTP.Messages.Request; redirect::Bool, redirect_limit::Int64, redirect_method::Nothing, forwardheaders::Bool, response_stream::Nothing, kw::@Kwargs{…})
    @ HTTP.RedirectRequest ~/work/tmp/HTTP.jl/src/clientlayers/RedirectRequest.jl:25
 [11] redirects
    @ ~/work/tmp/HTTP.jl/src/clientlayers/RedirectRequest.jl:14 [inlined]
 [12] (::HTTP.MessageRequest.var"#makerequest#3"{…})(method::String, url::URIs.URI, headers::Nothing, body::Vector{…}; copyheaders::Bool, response_stream::Nothing, http_version::HTTP.Strings.HTTPVersion, verbose::Int64, kw::@Kwargs{})
    @ HTTP.MessageRequest ~/work/tmp/HTTP.jl/src/clientlayers/MessageRequest.jl:35
 [13] makerequest
    @ ~/work/tmp/HTTP.jl/src/clientlayers/MessageRequest.jl:24 [inlined]
 [14] request(stack::HTTP.MessageRequest.var"#makerequest#3"{…}, method::String, url::String, h::Nothing, b::Vector{…}, q::Nothing; headers::Nothing, body::Vector{…}, query::Nothing, kw::@Kwargs{})
    @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:457
 [15] request(stack::Function, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::Nothing)
    @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:455
 [16] #request#20
    @ ~/work/tmp/HTTP.jl/src/HTTP.jl:315 [inlined]
 [17] request (repeats 2 times)
    @ ~/work/tmp/HTTP.jl/src/HTTP.jl:313 [inlined]
 [18] get(a::String)
    @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:518
 [19] top-level scope
    @ REPL[3]:1

caused by: MethodError: no method matching sslupgrade(::Nothing, ::HTTP.Connections.Connection{Sockets.TCPSocket}, ::SubString{String}; readtimeout::Int64, iofunction::Nothing, decompress::Nothing, verbose::Int64)

Closest candidates are:
  sslupgrade(::Type{IOType}, ::HTTP.Connections.Connection{T}, ::AbstractString; pool, require_ssl_verification, keepalive, readtimeout, kw...) where {T, IOType}
   @ HTTP ~/work/tmp/HTTP.jl/src/Connections.jl:613

Stacktrace:
  [1] (::HTTP.ConnectionRequest.var"#connections#4"{…})(req::HTTP.Messages.Request; proxy::String, socket_type::Type, socket_type_tls::Nothing, readtimeout::Int64, connect_timeout::Int64, logerrors::Bool, logtag::Nothing, kw::@Kwargs{…})
    @ HTTP.ConnectionRequest ~/work/tmp/HTTP.jl/src/clientlayers/ConnectionRequest.jl:113
  [2] connections
    @ ~/work/tmp/HTTP.jl/src/clientlayers/ConnectionRequest.jl:58 [inlined]
  [3] (::Base.var"#96#98"{Base.var"#96#97#99"{…}})(args::HTTP.Messages.Request; kwargs::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
    @ Base ./error.jl:296
  [4] (::HTTP.RetryRequest.var"#manageretries#3"{…})(req::HTTP.Messages.Request; retry::Bool, retries::Int64, retry_delays::ExponentialBackOff, retry_check::Function, retry_non_idempotent::Bool, kw::@Kwargs{…})
    @ HTTP.RetryRequest ~/work/tmp/HTTP.jl/src/clientlayers/RetryRequest.jl:75
  [5] manageretries
    @ ~/work/tmp/HTTP.jl/src/clientlayers/RetryRequest.jl:30 [inlined]
  [6] (::HTTP.CookieRequest.var"#managecookies#4"{…})(req::HTTP.Messages.Request; cookies::Bool, cookiejar::HTTP.Cookies.CookieJar, kw::@Kwargs{…})
    @ HTTP.CookieRequest ~/work/tmp/HTTP.jl/src/clientlayers/CookieRequest.jl:42
  [7] managecookies
    @ ~/work/tmp/HTTP.jl/src/clientlayers/CookieRequest.jl:19 [inlined]
  [8] (::HTTP.HeadersRequest.var"#defaultheaders#2"{…})(req::HTTP.Messages.Request; iofunction::Nothing, decompress::Nothing, basicauth::Bool, detect_content_type::Bool, canonicalize_headers::Bool, kw::@Kwargs{…})
    @ HTTP.HeadersRequest ~/work/tmp/HTTP.jl/src/clientlayers/HeadersRequest.jl:71
  [9] defaultheaders
    @ ~/work/tmp/HTTP.jl/src/clientlayers/HeadersRequest.jl:14 [inlined]
 [10] (::HTTP.RedirectRequest.var"#redirects#3"{…})(req::HTTP.Messages.Request; redirect::Bool, redirect_limit::Int64, redirect_method::Nothing, forwardheaders::Bool, response_stream::Nothing, kw::@Kwargs{…})
    @ HTTP.RedirectRequest ~/work/tmp/HTTP.jl/src/clientlayers/RedirectRequest.jl:25
 [11] redirects
    @ ~/work/tmp/HTTP.jl/src/clientlayers/RedirectRequest.jl:14 [inlined]
 [12] (::HTTP.MessageRequest.var"#makerequest#3"{…})(method::String, url::URIs.URI, headers::Nothing, body::Vector{…}; copyheaders::Bool, response_stream::Nothing, http_version::HTTP.Strings.HTTPVersion, verbose::Int64, kw::@Kwargs{})
    @ HTTP.MessageRequest ~/work/tmp/HTTP.jl/src/clientlayers/MessageRequest.jl:35
 [13] makerequest
    @ ~/work/tmp/HTTP.jl/src/clientlayers/MessageRequest.jl:24 [inlined]
 [14] request(stack::HTTP.MessageRequest.var"#makerequest#3"{…}, method::String, url::String, h::Nothing, b::Vector{…}, q::Nothing; headers::Nothing, body::Vector{…}, query::Nothing, kw::@Kwargs{})
    @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:457
 [15] request(stack::Function, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::Nothing)
    @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:455
 [16] #request#20
    @ ~/work/tmp/HTTP.jl/src/HTTP.jl:315 [inlined]
 [17] request (repeats 2 times)
    @ ~/work/tmp/HTTP.jl/src/HTTP.jl:313 [inlined]
 [18] get(a::String)
    @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:518
 [19] top-level scope
    @ REPL[3]:1
Some type information was truncated. Use `show(err)` to see complete types.

cc @cmcaine

@cmcaine
Copy link
Contributor

cmcaine commented May 6, 2024 via email

@felipenoris
Copy link

I also ran the test suite. cc @cmcaine

(HTTP) pkg> st
Project HTTP v1.10.6
Status `~/work/tmp/HTTP.jl/Project.toml`
  [944b1d66] CodecZlib v0.7.4
  [f0e56b4a] ConcurrentUtilities v2.4.1
  [460bff9d] ExceptionUnwrapping v0.1.10
  [e6f89c97] LoggingExtras v1.0.3
  [739be429] MbedTLS v1.1.9
  [4d8831e6] OpenSSL v1.4.3
  [777ac1f9] SimpleBufferStream v1.1.0
  [5c2747f8] URIs v1.5.1
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [56ddb016] Logging
  [ca575930] NetworkOptions v1.2.0
  [9a3f8284] Random
  [6462fe0b] Sockets
  [cf7118a7] UUIDs

(HTTP) pkg> up
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
  No Changes to `~/work/tmp/HTTP.jl/Project.toml`
  No Changes to `~/work/tmp/HTTP.jl/Manifest.toml`

julia> using Pkg; Pkg.test("HTTP", test_args=["issue-1172.jl"])
     Testing HTTP
      Status `/tmp/jl_jZSdfV/Project.toml`
  [e1450e63] BufferedStreams v1.2.1
  [944b1d66] CodecZlib v0.7.4
  [f0e56b4a] ConcurrentUtilities v2.4.1
  [460bff9d] ExceptionUnwrapping v0.1.10
  [cd3eb016] HTTP v1.10.6 `~/work/tmp/HTTP.jl`
  [682c06a0] JSON v0.21.4
  [e6f89c97] LoggingExtras v1.0.3
  [739be429] MbedTLS v1.1.9
  [4d8831e6] OpenSSL v1.4.3
  [777ac1f9] SimpleBufferStream v1.1.0
  [5c2747f8] URIs v1.5.1
  [1986cc42] Unitful v1.19.0
  [04572ae6] Deno_jll v1.33.4+0
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [8ba89e20] Distributed
  [b77e0a4c] InteractiveUtils
  [56ddb016] Logging
  [ca575930] NetworkOptions v1.2.0
  [9a3f8284] Random
  [6462fe0b] Sockets
  [8dfed614] Test
  [cf7118a7] UUIDs
      Status `/tmp/jl_jZSdfV/Manifest.toml`
  [d1d4a3ce] BitFlags v0.1.8
  [e1450e63] BufferedStreams v1.2.1
  [944b1d66] CodecZlib v0.7.4
  [f0e56b4a] ConcurrentUtilities v2.4.1
  [460bff9d] ExceptionUnwrapping v0.1.10
  [cd3eb016] HTTP v1.10.6 `~/work/tmp/HTTP.jl`
  [692b3bcd] JLLWrappers v1.5.0
  [682c06a0] JSON v0.21.4
  [e6f89c97] LoggingExtras v1.0.3
  [739be429] MbedTLS v1.1.9
  [4d8831e6] OpenSSL v1.4.3
  [69de0a69] Parsers v2.8.1
  [aea7be01] PrecompileTools v1.2.1
  [21216c6a] Preferences v1.4.3
  [777ac1f9] SimpleBufferStream v1.1.0
  [3bb67fe8] TranscodingStreams v0.10.8
  [5c2747f8] URIs v1.5.1
  [1986cc42] Unitful v1.19.0
  [04572ae6] Deno_jll v1.33.4+0
  [458c3c95] OpenSSL_jll v3.0.13+1
  [56f22d72] Artifacts
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [8ba89e20] Distributed
  [b77e0a4c] InteractiveUtils
  [8f399da3] Libdl
  [37e2e46d] LinearAlgebra
  [56ddb016] Logging
  [d6f4376e] Markdown
  [a63ad114] Mmap
  [ca575930] NetworkOptions v1.2.0
  [de0858da] Printf
  [9a3f8284] Random
  [ea8e919c] SHA v0.7.0
  [9e88b42a] Serialization
  [6462fe0b] Sockets
  [fa267f1f] TOML v1.0.3
  [8dfed614] Test
  [cf7118a7] UUIDs
  [4ec0a83e] Unicode
  [e66e0078] CompilerSupportLibraries_jll v1.1.0+0
  [c8ffd9c3] MbedTLS_jll v2.28.2+1
  [14a3606d] MozillaCACerts_jll v2023.1.10
  [4536629a] OpenBLAS_jll v0.3.23+4
  [83775a58] Zlib_jll v1.2.13+1
  [8e850b90] libblastrampoline_jll v5.8.0+1
Precompiling project...
  22 dependencies successfully precompiled in 27 seconds. 3 already precompiled.
     Testing Running tests...
Running issue-1172.jl tests...
httpbin: Error During Test at /home/fnoro/work/tmp/HTTP.jl/test/issue-1172.jl:5
  Test threw exception
  Expression: isok(HTTP.get("https://$(httpbin)/ip"))
  HTTP.RequestError:
  HTTP.Request:
  HTTP.Messages.Request:
  """
  GET /ip HTTP/1.1
  Host: httpbingo.julialang.org
  Accept: */*
  User-Agent: HTTP.jl/1.10.2
  Content-Length: 0
  Accept-Encoding: gzip
  Proxy-Authorization: ******
  
  """Underlying error:
  MethodError: no method matching sslupgrade(::Nothing, ::HTTP.Connections.Connection{Sockets.TCPSocket}, ::SubString{String}; readtimeout::Int64, iofunction::Nothing, decompress::Nothing, verbose::Int64)
  
  Closest candidates are:
    sslupgrade(::Type{IOType}, ::HTTP.Connections.Connection{T}, ::AbstractString; pool, require_ssl_verification, keepalive, readtimeout, kw...) where {T, IOType}
     @ HTTP ~/work/tmp/HTTP.jl/src/Connections.jl:613
  
  Stacktrace:
    [1] (::HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}})(req::HTTP.Messages.Request; proxy::String, socket_type::Type, socket_type_tls::Nothing, readtimeout::Int64, connect_timeout::Int64, logerrors::Bool, logtag::Nothing, kw::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ HTTP.ConnectionRequest ~/work/tmp/HTTP.jl/src/clientlayers/ConnectionRequest.jl:140
    [2] connections
      @ ~/work/tmp/HTTP.jl/src/clientlayers/ConnectionRequest.jl:58 [inlined]
    [3] (::Base.var"#96#98"{Base.var"#96#97#99"{ExponentialBackOff, HTTP.RetryRequest.var"#2#5"{Int64, typeof(HTTP.RetryRequest.FALSE), HTTP.Messages.Request, Base.RefValue{Int64}}, HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}})(args::HTTP.Messages.Request; kwargs::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ Base ./error.jl:296
    [4] (::HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}})(req::HTTP.Messages.Request; retry::Bool, retries::Int64, retry_delays::ExponentialBackOff, retry_check::Function, retry_non_idempotent::Bool, kw::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ HTTP.RetryRequest ~/work/tmp/HTTP.jl/src/clientlayers/RetryRequest.jl:75
    [5] manageretries
      @ ~/work/tmp/HTTP.jl/src/clientlayers/RetryRequest.jl:30 [inlined]
    [6] (::HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}})(req::HTTP.Messages.Request; cookies::Bool, cookiejar::HTTP.Cookies.CookieJar, kw::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ HTTP.CookieRequest ~/work/tmp/HTTP.jl/src/clientlayers/CookieRequest.jl:42
    [7] managecookies
      @ ~/work/tmp/HTTP.jl/src/clientlayers/CookieRequest.jl:19 [inlined]
    [8] (::HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}})(req::HTTP.Messages.Request; iofunction::Nothing, decompress::Nothing, basicauth::Bool, detect_content_type::Bool, canonicalize_headers::Bool, kw::@Kwargs{verbose::Int64})
      @ HTTP.HeadersRequest ~/work/tmp/HTTP.jl/src/clientlayers/HeadersRequest.jl:71
    [9] defaultheaders
      @ ~/work/tmp/HTTP.jl/src/clientlayers/HeadersRequest.jl:14 [inlined]
   [10] (::HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}})(req::HTTP.Messages.Request; redirect::Bool, redirect_limit::Int64, redirect_method::Nothing, forwardheaders::Bool, response_stream::Nothing, kw::@Kwargs{verbose::Int64})
      @ HTTP.RedirectRequest ~/work/tmp/HTTP.jl/src/clientlayers/RedirectRequest.jl:25
   [11] redirects
      @ ~/work/tmp/HTTP.jl/src/clientlayers/RedirectRequest.jl:14 [inlined]
   [12] (::HTTP.MessageRequest.var"#makerequest#3"{HTTP.MessageRequest.var"#makerequest#1#4"{HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}}}})(method::String, url::URIs.URI, headers::Nothing, body::Vector{UInt8}; copyheaders::Bool, response_stream::Nothing, http_version::HTTP.Strings.HTTPVersion, verbose::Int64, kw::@Kwargs{})
      @ HTTP.MessageRequest ~/work/tmp/HTTP.jl/src/clientlayers/MessageRequest.jl:35
   [13] makerequest
      @ ~/work/tmp/HTTP.jl/src/clientlayers/MessageRequest.jl:24 [inlined]
   [14] request(stack::HTTP.MessageRequest.var"#makerequest#3"{HTTP.MessageRequest.var"#makerequest#1#4"{HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}}}}, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::Nothing; headers::Nothing, body::Vector{UInt8}, query::Nothing, kw::@Kwargs{})
      @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:457
   [15] request(stack::Function, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::Nothing)
      @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:455
   [16] #request#20
      @ ~/work/tmp/HTTP.jl/src/HTTP.jl:315 [inlined]
   [17] request (repeats 2 times)
      @ ~/work/tmp/HTTP.jl/src/HTTP.jl:313 [inlined]
   [18] get(a::String)
      @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:518
   [19] macro expansion
      @ ~/work/tmp/HTTP.jl/test/issue-1172.jl:5 [inlined]
   [20] macro expansion
      @ ~/work/local/julia-1.10.2/share/julia/stdlib/v1.10/Test/src/Test.jl:669 [inlined]
   [21] macro expansion
      @ ~/work/tmp/HTTP.jl/test/issue-1172.jl:5 [inlined]
   [22] macro expansion
      @ ~/work/local/julia-1.10.2/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
   [23] top-level scope
      @ ~/work/tmp/HTTP.jl/test/issue-1172.jl:5
  
  caused by: MethodError: no method matching sslupgrade(::Nothing, ::HTTP.Connections.Connection{Sockets.TCPSocket}, ::SubString{String}; readtimeout::Int64, iofunction::Nothing, decompress::Nothing, verbose::Int64)
  
  Closest candidates are:
    sslupgrade(::Type{IOType}, ::HTTP.Connections.Connection{T}, ::AbstractString; pool, require_ssl_verification, keepalive, readtimeout, kw...) where {T, IOType}
     @ HTTP ~/work/tmp/HTTP.jl/src/Connections.jl:613
  
  Stacktrace:
    [1] (::HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}})(req::HTTP.Messages.Request; proxy::String, socket_type::Type, socket_type_tls::Nothing, readtimeout::Int64, connect_timeout::Int64, logerrors::Bool, logtag::Nothing, kw::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ HTTP.ConnectionRequest ~/work/tmp/HTTP.jl/src/clientlayers/ConnectionRequest.jl:113
    [2] connections
      @ ~/work/tmp/HTTP.jl/src/clientlayers/ConnectionRequest.jl:58 [inlined]
    [3] (::Base.var"#96#98"{Base.var"#96#97#99"{ExponentialBackOff, HTTP.RetryRequest.var"#2#5"{Int64, typeof(HTTP.RetryRequest.FALSE), HTTP.Messages.Request, Base.RefValue{Int64}}, HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}})(args::HTTP.Messages.Request; kwargs::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ Base ./error.jl:296
    [4] (::HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}})(req::HTTP.Messages.Request; retry::Bool, retries::Int64, retry_delays::ExponentialBackOff, retry_check::Function, retry_non_idempotent::Bool, kw::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ HTTP.RetryRequest ~/work/tmp/HTTP.jl/src/clientlayers/RetryRequest.jl:75
    [5] manageretries
      @ ~/work/tmp/HTTP.jl/src/clientlayers/RetryRequest.jl:30 [inlined]
    [6] (::HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}})(req::HTTP.Messages.Request; cookies::Bool, cookiejar::HTTP.Cookies.CookieJar, kw::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ HTTP.CookieRequest ~/work/tmp/HTTP.jl/src/clientlayers/CookieRequest.jl:42
    [7] managecookies
      @ ~/work/tmp/HTTP.jl/src/clientlayers/CookieRequest.jl:19 [inlined]
    [8] (::HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}})(req::HTTP.Messages.Request; iofunction::Nothing, decompress::Nothing, basicauth::Bool, detect_content_type::Bool, canonicalize_headers::Bool, kw::@Kwargs{verbose::Int64})
      @ HTTP.HeadersRequest ~/work/tmp/HTTP.jl/src/clientlayers/HeadersRequest.jl:71
    [9] defaultheaders
      @ ~/work/tmp/HTTP.jl/src/clientlayers/HeadersRequest.jl:14 [inlined]
   [10] (::HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}})(req::HTTP.Messages.Request; redirect::Bool, redirect_limit::Int64, redirect_method::Nothing, forwardheaders::Bool, response_stream::Nothing, kw::@Kwargs{verbose::Int64})
      @ HTTP.RedirectRequest ~/work/tmp/HTTP.jl/src/clientlayers/RedirectRequest.jl:25
   [11] redirects
      @ ~/work/tmp/HTTP.jl/src/clientlayers/RedirectRequest.jl:14 [inlined]
   [12] (::HTTP.MessageRequest.var"#makerequest#3"{HTTP.MessageRequest.var"#makerequest#1#4"{HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}}}})(method::String, url::URIs.URI, headers::Nothing, body::Vector{UInt8}; copyheaders::Bool, response_stream::Nothing, http_version::HTTP.Strings.HTTPVersion, verbose::Int64, kw::@Kwargs{})
      @ HTTP.MessageRequest ~/work/tmp/HTTP.jl/src/clientlayers/MessageRequest.jl:35
   [13] makerequest
      @ ~/work/tmp/HTTP.jl/src/clientlayers/MessageRequest.jl:24 [inlined]
   [14] request(stack::HTTP.MessageRequest.var"#makerequest#3"{HTTP.MessageRequest.var"#makerequest#1#4"{HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}}}}, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::Nothing; headers::Nothing, body::Vector{UInt8}, query::Nothing, kw::@Kwargs{})
      @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:457
   [15] request(stack::Function, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::Nothing)
      @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:455
   [16] #request#20
      @ ~/work/tmp/HTTP.jl/src/HTTP.jl:315 [inlined]
   [17] request (repeats 2 times)
      @ ~/work/tmp/HTTP.jl/src/HTTP.jl:313 [inlined]
   [18] get(a::String)
      @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:518
   [19] macro expansion
      @ ~/work/tmp/HTTP.jl/test/issue-1172.jl:5 [inlined]
   [20] macro expansion
      @ ~/work/local/julia-1.10.2/share/julia/stdlib/v1.10/Test/src/Test.jl:669 [inlined]
   [21] macro expansion
      @ ~/work/tmp/HTTP.jl/test/issue-1172.jl:5 [inlined]
   [22] macro expansion
      @ ~/work/local/julia-1.10.2/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
   [23] top-level scope
      @ ~/work/tmp/HTTP.jl/test/issue-1172.jl:5
Example.com: Error During Test at /home/fnoro/work/tmp/HTTP.jl/test/issue-1172.jl:9
  Test threw exception
  Expression: isok(HTTP.get("https://example.com"))
  HTTP.RequestError:
  HTTP.Request:
  HTTP.Messages.Request:
  """
  GET / HTTP/1.1
  Host: example.com
  Accept: */*
  User-Agent: HTTP.jl/1.10.2
  Content-Length: 0
  Accept-Encoding: gzip
  Proxy-Authorization: ******
  
  """Underlying error:
  MethodError: no method matching sslupgrade(::Nothing, ::HTTP.Connections.Connection{Sockets.TCPSocket}, ::SubString{String}; readtimeout::Int64, iofunction::Nothing, decompress::Nothing, verbose::Int64)
  
  Closest candidates are:
    sslupgrade(::Type{IOType}, ::HTTP.Connections.Connection{T}, ::AbstractString; pool, require_ssl_verification, keepalive, readtimeout, kw...) where {T, IOType}
     @ HTTP ~/work/tmp/HTTP.jl/src/Connections.jl:613
  
  Stacktrace:
    [1] (::HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}})(req::HTTP.Messages.Request; proxy::String, socket_type::Type, socket_type_tls::Nothing, readtimeout::Int64, connect_timeout::Int64, logerrors::Bool, logtag::Nothing, kw::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ HTTP.ConnectionRequest ~/work/tmp/HTTP.jl/src/clientlayers/ConnectionRequest.jl:140
    [2] connections
      @ ~/work/tmp/HTTP.jl/src/clientlayers/ConnectionRequest.jl:58 [inlined]
    [3] (::Base.var"#96#98"{Base.var"#96#97#99"{ExponentialBackOff, HTTP.RetryRequest.var"#2#5"{Int64, typeof(HTTP.RetryRequest.FALSE), HTTP.Messages.Request, Base.RefValue{Int64}}, HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}})(args::HTTP.Messages.Request; kwargs::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ Base ./error.jl:296
    [4] (::HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}})(req::HTTP.Messages.Request; retry::Bool, retries::Int64, retry_delays::ExponentialBackOff, retry_check::Function, retry_non_idempotent::Bool, kw::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ HTTP.RetryRequest ~/work/tmp/HTTP.jl/src/clientlayers/RetryRequest.jl:75
    [5] manageretries
      @ ~/work/tmp/HTTP.jl/src/clientlayers/RetryRequest.jl:30 [inlined]
    [6] (::HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}})(req::HTTP.Messages.Request; cookies::Bool, cookiejar::HTTP.Cookies.CookieJar, kw::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ HTTP.CookieRequest ~/work/tmp/HTTP.jl/src/clientlayers/CookieRequest.jl:42
    [7] managecookies
      @ ~/work/tmp/HTTP.jl/src/clientlayers/CookieRequest.jl:19 [inlined]
    [8] (::HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}})(req::HTTP.Messages.Request; iofunction::Nothing, decompress::Nothing, basicauth::Bool, detect_content_type::Bool, canonicalize_headers::Bool, kw::@Kwargs{verbose::Int64})
      @ HTTP.HeadersRequest ~/work/tmp/HTTP.jl/src/clientlayers/HeadersRequest.jl:71
    [9] defaultheaders
      @ ~/work/tmp/HTTP.jl/src/clientlayers/HeadersRequest.jl:14 [inlined]
   [10] (::HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}})(req::HTTP.Messages.Request; redirect::Bool, redirect_limit::Int64, redirect_method::Nothing, forwardheaders::Bool, response_stream::Nothing, kw::@Kwargs{verbose::Int64})
      @ HTTP.RedirectRequest ~/work/tmp/HTTP.jl/src/clientlayers/RedirectRequest.jl:25
   [11] redirects
      @ ~/work/tmp/HTTP.jl/src/clientlayers/RedirectRequest.jl:14 [inlined]
   [12] (::HTTP.MessageRequest.var"#makerequest#3"{HTTP.MessageRequest.var"#makerequest#1#4"{HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}}}})(method::String, url::URIs.URI, headers::Nothing, body::Vector{UInt8}; copyheaders::Bool, response_stream::Nothing, http_version::HTTP.Strings.HTTPVersion, verbose::Int64, kw::@Kwargs{})
      @ HTTP.MessageRequest ~/work/tmp/HTTP.jl/src/clientlayers/MessageRequest.jl:35
   [13] makerequest
      @ ~/work/tmp/HTTP.jl/src/clientlayers/MessageRequest.jl:24 [inlined]
   [14] request(stack::HTTP.MessageRequest.var"#makerequest#3"{HTTP.MessageRequest.var"#makerequest#1#4"{HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}}}}, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::Nothing; headers::Nothing, body::Vector{UInt8}, query::Nothing, kw::@Kwargs{})
      @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:457
   [15] request(stack::Function, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::Nothing)
      @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:455
   [16] #request#20
      @ ~/work/tmp/HTTP.jl/src/HTTP.jl:315 [inlined]
   [17] request (repeats 2 times)
      @ ~/work/tmp/HTTP.jl/src/HTTP.jl:313 [inlined]
   [18] get(a::String)
      @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:518
   [19] macro expansion
      @ ~/work/tmp/HTTP.jl/test/issue-1172.jl:9 [inlined]
   [20] macro expansion
      @ ~/work/local/julia-1.10.2/share/julia/stdlib/v1.10/Test/src/Test.jl:669 [inlined]
   [21] macro expansion
      @ ~/work/tmp/HTTP.jl/test/issue-1172.jl:9 [inlined]
   [22] macro expansion
      @ ~/work/local/julia-1.10.2/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
   [23] top-level scope
      @ ~/work/tmp/HTTP.jl/test/issue-1172.jl:9
  
  caused by: MethodError: no method matching sslupgrade(::Nothing, ::HTTP.Connections.Connection{Sockets.TCPSocket}, ::SubString{String}; readtimeout::Int64, iofunction::Nothing, decompress::Nothing, verbose::Int64)
  
  Closest candidates are:
    sslupgrade(::Type{IOType}, ::HTTP.Connections.Connection{T}, ::AbstractString; pool, require_ssl_verification, keepalive, readtimeout, kw...) where {T, IOType}
     @ HTTP ~/work/tmp/HTTP.jl/src/Connections.jl:613
  
  Stacktrace:
    [1] (::HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}})(req::HTTP.Messages.Request; proxy::String, socket_type::Type, socket_type_tls::Nothing, readtimeout::Int64, connect_timeout::Int64, logerrors::Bool, logtag::Nothing, kw::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ HTTP.ConnectionRequest ~/work/tmp/HTTP.jl/src/clientlayers/ConnectionRequest.jl:113
    [2] connections
      @ ~/work/tmp/HTTP.jl/src/clientlayers/ConnectionRequest.jl:58 [inlined]
    [3] (::Base.var"#96#98"{Base.var"#96#97#99"{ExponentialBackOff, HTTP.RetryRequest.var"#2#5"{Int64, typeof(HTTP.RetryRequest.FALSE), HTTP.Messages.Request, Base.RefValue{Int64}}, HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}})(args::HTTP.Messages.Request; kwargs::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ Base ./error.jl:296
    [4] (::HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}})(req::HTTP.Messages.Request; retry::Bool, retries::Int64, retry_delays::ExponentialBackOff, retry_check::Function, retry_non_idempotent::Bool, kw::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ HTTP.RetryRequest ~/work/tmp/HTTP.jl/src/clientlayers/RetryRequest.jl:75
    [5] manageretries
      @ ~/work/tmp/HTTP.jl/src/clientlayers/RetryRequest.jl:30 [inlined]
    [6] (::HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}})(req::HTTP.Messages.Request; cookies::Bool, cookiejar::HTTP.Cookies.CookieJar, kw::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ HTTP.CookieRequest ~/work/tmp/HTTP.jl/src/clientlayers/CookieRequest.jl:42
    [7] managecookies
      @ ~/work/tmp/HTTP.jl/src/clientlayers/CookieRequest.jl:19 [inlined]
    [8] (::HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}})(req::HTTP.Messages.Request; iofunction::Nothing, decompress::Nothing, basicauth::Bool, detect_content_type::Bool, canonicalize_headers::Bool, kw::@Kwargs{verbose::Int64})
      @ HTTP.HeadersRequest ~/work/tmp/HTTP.jl/src/clientlayers/HeadersRequest.jl:71
    [9] defaultheaders
      @ ~/work/tmp/HTTP.jl/src/clientlayers/HeadersRequest.jl:14 [inlined]
   [10] (::HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}})(req::HTTP.Messages.Request; redirect::Bool, redirect_limit::Int64, redirect_method::Nothing, forwardheaders::Bool, response_stream::Nothing, kw::@Kwargs{verbose::Int64})
      @ HTTP.RedirectRequest ~/work/tmp/HTTP.jl/src/clientlayers/RedirectRequest.jl:25
   [11] redirects
      @ ~/work/tmp/HTTP.jl/src/clientlayers/RedirectRequest.jl:14 [inlined]
   [12] (::HTTP.MessageRequest.var"#makerequest#3"{HTTP.MessageRequest.var"#makerequest#1#4"{HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}}}})(method::String, url::URIs.URI, headers::Nothing, body::Vector{UInt8}; copyheaders::Bool, response_stream::Nothing, http_version::HTTP.Strings.HTTPVersion, verbose::Int64, kw::@Kwargs{})
      @ HTTP.MessageRequest ~/work/tmp/HTTP.jl/src/clientlayers/MessageRequest.jl:35
   [13] makerequest
      @ ~/work/tmp/HTTP.jl/src/clientlayers/MessageRequest.jl:24 [inlined]
   [14] request(stack::HTTP.MessageRequest.var"#makerequest#3"{HTTP.MessageRequest.var"#makerequest#1#4"{HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}}}}, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::Nothing; headers::Nothing, body::Vector{UInt8}, query::Nothing, kw::@Kwargs{})
      @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:457
   [15] request(stack::Function, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::Nothing)
      @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:455
   [16] #request#20
      @ ~/work/tmp/HTTP.jl/src/HTTP.jl:315 [inlined]
   [17] request (repeats 2 times)
      @ ~/work/tmp/HTTP.jl/src/HTTP.jl:313 [inlined]
   [18] get(a::String)
      @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:518
   [19] macro expansion
      @ ~/work/tmp/HTTP.jl/test/issue-1172.jl:9 [inlined]
   [20] macro expansion
      @ ~/work/local/julia-1.10.2/share/julia/stdlib/v1.10/Test/src/Test.jl:669 [inlined]
   [21] macro expansion
      @ ~/work/tmp/HTTP.jl/test/issue-1172.jl:9 [inlined]
   [22] macro expansion
      @ ~/work/local/julia-1.10.2/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
   [23] top-level scope
      @ ~/work/tmp/HTTP.jl/test/issue-1172.jl:9
etabus: Error During Test at /home/fnoro/work/tmp/HTTP.jl/test/issue-1172.jl:13
  Test threw exception
  Expression: isok(HTTP.get("https://data.etabus.gov.hk/"))
  HTTP.RequestError:
  HTTP.Request:
  HTTP.Messages.Request:
  """
  GET / HTTP/1.1
  Host: data.etabus.gov.hk
  Accept: */*
  User-Agent: HTTP.jl/1.10.2
  Content-Length: 0
  Accept-Encoding: gzip
  Proxy-Authorization: ******
  
  """Underlying error:
  MethodError: no method matching sslupgrade(::Nothing, ::HTTP.Connections.Connection{Sockets.TCPSocket}, ::SubString{String}; readtimeout::Int64, iofunction::Nothing, decompress::Nothing, verbose::Int64)
  
  Closest candidates are:
    sslupgrade(::Type{IOType}, ::HTTP.Connections.Connection{T}, ::AbstractString; pool, require_ssl_verification, keepalive, readtimeout, kw...) where {T, IOType}
     @ HTTP ~/work/tmp/HTTP.jl/src/Connections.jl:613
  
  Stacktrace:
    [1] (::HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}})(req::HTTP.Messages.Request; proxy::String, socket_type::Type, socket_type_tls::Nothing, readtimeout::Int64, connect_timeout::Int64, logerrors::Bool, logtag::Nothing, kw::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ HTTP.ConnectionRequest ~/work/tmp/HTTP.jl/src/clientlayers/ConnectionRequest.jl:140
    [2] connections
      @ ~/work/tmp/HTTP.jl/src/clientlayers/ConnectionRequest.jl:58 [inlined]
    [3] (::Base.var"#96#98"{Base.var"#96#97#99"{ExponentialBackOff, HTTP.RetryRequest.var"#2#5"{Int64, typeof(HTTP.RetryRequest.FALSE), HTTP.Messages.Request, Base.RefValue{Int64}}, HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}})(args::HTTP.Messages.Request; kwargs::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ Base ./error.jl:296
    [4] (::HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}})(req::HTTP.Messages.Request; retry::Bool, retries::Int64, retry_delays::ExponentialBackOff, retry_check::Function, retry_non_idempotent::Bool, kw::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ HTTP.RetryRequest ~/work/tmp/HTTP.jl/src/clientlayers/RetryRequest.jl:75
    [5] manageretries
      @ ~/work/tmp/HTTP.jl/src/clientlayers/RetryRequest.jl:30 [inlined]
    [6] (::HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}})(req::HTTP.Messages.Request; cookies::Bool, cookiejar::HTTP.Cookies.CookieJar, kw::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ HTTP.CookieRequest ~/work/tmp/HTTP.jl/src/clientlayers/CookieRequest.jl:42
    [7] managecookies
      @ ~/work/tmp/HTTP.jl/src/clientlayers/CookieRequest.jl:19 [inlined]
    [8] (::HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}})(req::HTTP.Messages.Request; iofunction::Nothing, decompress::Nothing, basicauth::Bool, detect_content_type::Bool, canonicalize_headers::Bool, kw::@Kwargs{verbose::Int64})
      @ HTTP.HeadersRequest ~/work/tmp/HTTP.jl/src/clientlayers/HeadersRequest.jl:71
    [9] defaultheaders
      @ ~/work/tmp/HTTP.jl/src/clientlayers/HeadersRequest.jl:14 [inlined]
   [10] (::HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}})(req::HTTP.Messages.Request; redirect::Bool, redirect_limit::Int64, redirect_method::Nothing, forwardheaders::Bool, response_stream::Nothing, kw::@Kwargs{verbose::Int64})
      @ HTTP.RedirectRequest ~/work/tmp/HTTP.jl/src/clientlayers/RedirectRequest.jl:25
   [11] redirects
      @ ~/work/tmp/HTTP.jl/src/clientlayers/RedirectRequest.jl:14 [inlined]
   [12] (::HTTP.MessageRequest.var"#makerequest#3"{HTTP.MessageRequest.var"#makerequest#1#4"{HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}}}})(method::String, url::URIs.URI, headers::Nothing, body::Vector{UInt8}; copyheaders::Bool, response_stream::Nothing, http_version::HTTP.Strings.HTTPVersion, verbose::Int64, kw::@Kwargs{})
      @ HTTP.MessageRequest ~/work/tmp/HTTP.jl/src/clientlayers/MessageRequest.jl:35
   [13] makerequest
      @ ~/work/tmp/HTTP.jl/src/clientlayers/MessageRequest.jl:24 [inlined]
   [14] request(stack::HTTP.MessageRequest.var"#makerequest#3"{HTTP.MessageRequest.var"#makerequest#1#4"{HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}}}}, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::Nothing; headers::Nothing, body::Vector{UInt8}, query::Nothing, kw::@Kwargs{})
      @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:457
   [15] request(stack::Function, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::Nothing)
      @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:455
   [16] #request#20
      @ ~/work/tmp/HTTP.jl/src/HTTP.jl:315 [inlined]
   [17] request (repeats 2 times)
      @ ~/work/tmp/HTTP.jl/src/HTTP.jl:313 [inlined]
   [18] get(a::String)
      @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:518
   [19] macro expansion
      @ ~/work/tmp/HTTP.jl/test/issue-1172.jl:13 [inlined]
   [20] macro expansion
      @ ~/work/local/julia-1.10.2/share/julia/stdlib/v1.10/Test/src/Test.jl:669 [inlined]
   [21] macro expansion
      @ ~/work/tmp/HTTP.jl/test/issue-1172.jl:13 [inlined]
   [22] macro expansion
      @ ~/work/local/julia-1.10.2/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
   [23] top-level scope
      @ ~/work/tmp/HTTP.jl/test/issue-1172.jl:13
  
  caused by: MethodError: no method matching sslupgrade(::Nothing, ::HTTP.Connections.Connection{Sockets.TCPSocket}, ::SubString{String}; readtimeout::Int64, iofunction::Nothing, decompress::Nothing, verbose::Int64)
  
  Closest candidates are:
    sslupgrade(::Type{IOType}, ::HTTP.Connections.Connection{T}, ::AbstractString; pool, require_ssl_verification, keepalive, readtimeout, kw...) where {T, IOType}
     @ HTTP ~/work/tmp/HTTP.jl/src/Connections.jl:613
  
  Stacktrace:
    [1] (::HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}})(req::HTTP.Messages.Request; proxy::String, socket_type::Type, socket_type_tls::Nothing, readtimeout::Int64, connect_timeout::Int64, logerrors::Bool, logtag::Nothing, kw::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ HTTP.ConnectionRequest ~/work/tmp/HTTP.jl/src/clientlayers/ConnectionRequest.jl:113
    [2] connections
      @ ~/work/tmp/HTTP.jl/src/clientlayers/ConnectionRequest.jl:58 [inlined]
    [3] (::Base.var"#96#98"{Base.var"#96#97#99"{ExponentialBackOff, HTTP.RetryRequest.var"#2#5"{Int64, typeof(HTTP.RetryRequest.FALSE), HTTP.Messages.Request, Base.RefValue{Int64}}, HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}})(args::HTTP.Messages.Request; kwargs::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ Base ./error.jl:296
    [4] (::HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}})(req::HTTP.Messages.Request; retry::Bool, retries::Int64, retry_delays::ExponentialBackOff, retry_check::Function, retry_non_idempotent::Bool, kw::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ HTTP.RetryRequest ~/work/tmp/HTTP.jl/src/clientlayers/RetryRequest.jl:75
    [5] manageretries
      @ ~/work/tmp/HTTP.jl/src/clientlayers/RetryRequest.jl:30 [inlined]
    [6] (::HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}})(req::HTTP.Messages.Request; cookies::Bool, cookiejar::HTTP.Cookies.CookieJar, kw::@Kwargs{iofunction::Nothing, decompress::Nothing, verbose::Int64})
      @ HTTP.CookieRequest ~/work/tmp/HTTP.jl/src/clientlayers/CookieRequest.jl:42
    [7] managecookies
      @ ~/work/tmp/HTTP.jl/src/clientlayers/CookieRequest.jl:19 [inlined]
    [8] (::HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}})(req::HTTP.Messages.Request; iofunction::Nothing, decompress::Nothing, basicauth::Bool, detect_content_type::Bool, canonicalize_headers::Bool, kw::@Kwargs{verbose::Int64})
      @ HTTP.HeadersRequest ~/work/tmp/HTTP.jl/src/clientlayers/HeadersRequest.jl:71
    [9] defaultheaders
      @ ~/work/tmp/HTTP.jl/src/clientlayers/HeadersRequest.jl:14 [inlined]
   [10] (::HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}})(req::HTTP.Messages.Request; redirect::Bool, redirect_limit::Int64, redirect_method::Nothing, forwardheaders::Bool, response_stream::Nothing, kw::@Kwargs{verbose::Int64})
      @ HTTP.RedirectRequest ~/work/tmp/HTTP.jl/src/clientlayers/RedirectRequest.jl:25
   [11] redirects
      @ ~/work/tmp/HTTP.jl/src/clientlayers/RedirectRequest.jl:14 [inlined]
   [12] (::HTTP.MessageRequest.var"#makerequest#3"{HTTP.MessageRequest.var"#makerequest#1#4"{HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}}}})(method::String, url::URIs.URI, headers::Nothing, body::Vector{UInt8}; copyheaders::Bool, response_stream::Nothing, http_version::HTTP.Strings.HTTPVersion, verbose::Int64, kw::@Kwargs{})
      @ HTTP.MessageRequest ~/work/tmp/HTTP.jl/src/clientlayers/MessageRequest.jl:35
   [13] makerequest
      @ ~/work/tmp/HTTP.jl/src/clientlayers/MessageRequest.jl:24 [inlined]
   [14] request(stack::HTTP.MessageRequest.var"#makerequest#3"{HTTP.MessageRequest.var"#makerequest#1#4"{HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}}}}, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::Nothing; headers::Nothing, body::Vector{UInt8}, query::Nothing, kw::@Kwargs{})
      @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:457
   [15] request(stack::Function, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::Nothing)
      @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:455
   [16] #request#20
      @ ~/work/tmp/HTTP.jl/src/HTTP.jl:315 [inlined]
   [17] request (repeats 2 times)
      @ ~/work/tmp/HTTP.jl/src/HTTP.jl:313 [inlined]
   [18] get(a::String)
      @ HTTP ~/work/tmp/HTTP.jl/src/HTTP.jl:518
   [19] macro expansion
      @ ~/work/tmp/HTTP.jl/test/issue-1172.jl:13 [inlined]
   [20] macro expansion
      @ ~/work/local/julia-1.10.2/share/julia/stdlib/v1.10/Test/src/Test.jl:669 [inlined]
   [21] macro expansion
      @ ~/work/tmp/HTTP.jl/test/issue-1172.jl:13 [inlined]
   [22] macro expansion
      @ ~/work/local/julia-1.10.2/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
   [23] top-level scope
      @ ~/work/tmp/HTTP.jl/test/issue-1172.jl:13
Test Summary: | Error  Total   Time
HTTP          |     3      3  25.5s
  httpbin     |     1      1  23.8s
  Example.com |     1      1   0.5s
  etabus      |     1      1   1.1s
ERROR: LoadError: Some tests did not pass: 0 passed, 0 failed, 3 errored, 0 broken.
in expression starting at /home/fnoro/work/tmp/HTTP.jl/test/runtests.jl:13
ERROR: Package HTTP errored during testing
Stacktrace:
 [1] pkgerror(msg::String)
   @ Pkg.Types ~/work/local/julia-1.10.2/share/julia/stdlib/v1.10/Pkg/src/Types.jl:70
 [2] test(ctx::Pkg.Types.Context, pkgs::Vector{…}; coverage::Bool, julia_args::Cmd, test_args::Cmd, test_fn::Nothing, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool)
   @ Pkg.Operations ~/work/local/julia-1.10.2/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:2018
 [3] test
   @ ~/work/local/julia-1.10.2/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:1899 [inlined]
 [4] test(ctx::Pkg.Types.Context, pkgs::Vector{…}; coverage::Bool, test_fn::Nothing, julia_args::Cmd, test_args::Vector{…}, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool, kwargs::@Kwargs{…})
   @ Pkg.API ~/work/local/julia-1.10.2/share/julia/stdlib/v1.10/Pkg/src/API.jl:444
 [5] test(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::@Kwargs{test_args::Vector{String}})
   @ Pkg.API ~/work/local/julia-1.10.2/share/julia/stdlib/v1.10/Pkg/src/API.jl:159
 [6] test
   @ ~/work/local/julia-1.10.2/share/julia/stdlib/v1.10/Pkg/src/API.jl:147 [inlined]
 [7] #test#74
   @ ~/work/local/julia-1.10.2/share/julia/stdlib/v1.10/Pkg/src/API.jl:146 [inlined]
 [8] top-level scope
   @ REPL[3]:1
Some type information was truncated. Use `show(err)` to see complete types.

julia> versioninfo()
Julia Version 1.10.2
Commit bd47eca2c8a (2024-03-01 10:14 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, haswell)
Threads: 16 default, 0 interactive, 8 GC (on 16 virtual cores)
Environment:
  LD_LIBRARY_PATH = :/usr/local/lib:/usr/local/lib64:/home/fnoro/work/local/lib64
  JULIA_PKG_USE_CLI_GIT = true
  JULIA_NUM_THREADS = 16

julia> Pkg.status()
Project HTTP v1.10.6
Status `~/work/tmp/HTTP.jl/Project.toml`
  [944b1d66] CodecZlib v0.7.4
  [f0e56b4a] ConcurrentUtilities v2.4.1
  [460bff9d] ExceptionUnwrapping v0.1.10
  [e6f89c97] LoggingExtras v1.0.3
  [739be429] MbedTLS v1.1.9
  [4d8831e6] OpenSSL v1.4.3
  [777ac1f9] SimpleBufferStream v1.1.0
  [5c2747f8] URIs v1.5.1
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [56ddb016] Logging
  [ca575930] NetworkOptions v1.2.0
  [9a3f8284] Random
  [6462fe0b] Sockets
  [cf7118a7] UUIDs

@cmcaine
Copy link
Contributor

cmcaine commented May 7, 2024

I can't reproduce the error and I don't see an error in my code. I've tried running the code on two x86_64 machines on different networks and with three different Julia versions.

The error might be occurring because of some peculiarity of your network environment (are you on a corporate network?) or because of something to do with the libraries in your LD_LIBRARY_PATH. Can you try tunning again with LD_LIBRARY_PATH unset and from a different network?

Here's the script that I am testing with:

# save as repro.jl
# run with: julia repro.jl

using Pkg

Pkg.activate(;temp=true)
Pkg.add(url="https://github.com/cmcaine/HTTP.jl", rev="fix-1172")
Pkg.test("HTTP", test_args=["issue-1172.jl"])

using InteractiveUtils: versioninfo
versioninfo()

@cmcaine
Copy link
Contributor

cmcaine commented May 8, 2024

Okay, I couldn't reproduce the issue because it only occurs if you have a proxy. This is now fixed in PR #1174.

@cmcaine
Copy link
Contributor

cmcaine commented May 8, 2024

I'm sorry for my oversight in not seeing this when I changed the code in the first place and for how long it took me to see the error once this issue was opened.

@felipenoris
Copy link

felipenoris commented May 8, 2024

@cmcaine thanks a lot! I tested again using "https://github.com/cmcaine/HTTP.jl", rev="fix-1172", and it now works!

julia> import HTTP

julia> HTTP.get("https://data.etabus.gov.hk/")
HTTP.Messages.Response:
"""
HTTP/1.1 200 OK
Date: Wed, 08 May 2024 17:55:23 GMT
Content-Length: 0
Connection: keep-alive
Access-Control-Allow-Origin: *
X-Content-Type-Options: nosniff
x-azure-ref: 20240508T175522Z-15f4865b4f8ddv7xstkfvyx8m800000001xg00000000a8dx
X-Cache: CONFIG_NOCACHE
Accept-Ranges: bytes

"""

@shikil
Copy link
Author

shikil commented May 9, 2024

It work now, thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants