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

Julia 1.8.0-beta1 gives 404 errors #803

Closed
fonsp opened this issue Mar 7, 2022 · 5 comments
Closed

Julia 1.8.0-beta1 gives 404 errors #803

fonsp opened this issue Mar 7, 2022 · 5 comments

Comments

@fonsp
Copy link
Member

fonsp commented Mar 7, 2022

I noticed that tests are failing on my package PlutoSliderServer.jl on Julia 1.8.0-beta1, the server is responding with empty 404 responses, which are not being sent from my code, but by HTTP.jl itself. The same code runs without errors on 1.7.

Example of test failure, not very minimal yet: https://github.com/JuliaPluto/PlutoSliderServer.jl/runs/5456108751?check_suite_focus=true#step:4:938 This 404 is not coming from my code (there is no endpoint that returns 404 without body. I added logs locally to verify that my 404 endpoints are not being hit).

Opening the domain in Chrome also shows 404 with an empty body.

Running the HTTP tests also fails on 1.8, with one similar-looking error:

HTTP test failure output
/Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia ; exit;
➜  ~ /Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia ; exit;
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.8.0-beta1 (2022-02-23)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.8) pkg> activate --temp
  Activating new project at `/var/folders/v_/fhpj9jn151d4p9c2fdw2gv780000gn/T/jl_tfkHKp`

(jl_tfkHKp) pkg> add HTTP
    Updating registry at `~/.julia/registries/General.toml`
   Resolving package versions...
    Updating `/private/var/folders/v_/fhpj9jn151d4p9c2fdw2gv780000gn/T/jl_tfkHKp/Project.toml`
  [cd3eb016] + HTTP v0.9.17
    Updating `/private/var/folders/v_/fhpj9jn151d4p9c2fdw2gv780000gn/T/jl_tfkHKp/Manifest.toml`
  [cd3eb016] + HTTP v0.9.17
  [83e8ac13] + IniFile v0.5.1
  [739be429] + MbedTLS v1.0.3
  [5c2747f8] + URIs v1.3.0
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8f399da3] + Libdl
  [56ddb016] + Logging
  [ca575930] + NetworkOptions v1.2.0
  [de0858da] + Printf
  [9a3f8284] + Random
  [ea8e919c] + SHA v0.7.0
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [4ec0a83e] + Unicode
  [c8ffd9c3] + MbedTLS_jll v2.28.0+0

(jl_tfkHKp) pkg> test HTTP
     Testing HTTP
      Status `/private/var/folders/v_/fhpj9jn151d4p9c2fdw2gv780000gn/T/jl_qKciX2/Project.toml`
  [e1450e63] BufferedStreams v1.0.0
  [cd3eb016] HTTP v0.9.17
  [83e8ac13] IniFile v0.5.1
  [682c06a0] JSON v0.21.3
  [739be429] MbedTLS v1.0.3
  [5c2747f8] URIs v1.3.0
  [1986cc42] Unitful v1.11.0
  [2a0f44e3] Base64 `@stdlib/Base64`
  [ade2ca70] Dates `@stdlib/Dates`
  [8ba89e20] Distributed `@stdlib/Distributed`
  [56ddb016] Logging `@stdlib/Logging`
  [ca575930] NetworkOptions v1.2.0 `@stdlib/NetworkOptions`
  [6462fe0b] Sockets `@stdlib/Sockets`
  [8dfed614] Test `@stdlib/Test`
      Status `/private/var/folders/v_/fhpj9jn151d4p9c2fdw2gv780000gn/T/jl_qKciX2/Manifest.toml`
  [e1450e63] BufferedStreams v1.0.0
  [34da2185] Compat v3.42.0
  [187b0558] ConstructionBase v1.3.0
  [cd3eb016] HTTP v0.9.17
  [83e8ac13] IniFile v0.5.1
  [682c06a0] JSON v0.21.3
  [739be429] MbedTLS v1.0.3
  [69de0a69] Parsers v2.2.3
  [5c2747f8] URIs v1.3.0
  [1986cc42] Unitful v1.11.0
  [0dad84c5] ArgTools v1.1.1 `@stdlib/ArgTools`
  [56f22d72] Artifacts `@stdlib/Artifacts`
  [2a0f44e3] Base64 `@stdlib/Base64`
  [ade2ca70] Dates `@stdlib/Dates`
  [8bb1440f] DelimitedFiles `@stdlib/DelimitedFiles`
  [8ba89e20] Distributed `@stdlib/Distributed`
  [f43a241f] Downloads v1.6.0 `@stdlib/Downloads`
  [7b1f6079] FileWatching `@stdlib/FileWatching`
  [b77e0a4c] InteractiveUtils `@stdlib/InteractiveUtils`
  [b27032c2] LibCURL v0.6.3 `@stdlib/LibCURL`
  [76f85450] LibGit2 `@stdlib/LibGit2`
  [8f399da3] Libdl `@stdlib/Libdl`
  [37e2e46d] LinearAlgebra `@stdlib/LinearAlgebra`
  [56ddb016] Logging `@stdlib/Logging`
  [d6f4376e] Markdown `@stdlib/Markdown`
  [a63ad114] Mmap `@stdlib/Mmap`
  [ca575930] NetworkOptions v1.2.0 `@stdlib/NetworkOptions`
  [44cfe95a] Pkg v1.8.0 `@stdlib/Pkg`
  [de0858da] Printf `@stdlib/Printf`
  [3fa0cd96] REPL `@stdlib/REPL`
  [9a3f8284] Random `@stdlib/Random`
  [ea8e919c] SHA v0.7.0 `@stdlib/SHA`
  [9e88b42a] Serialization `@stdlib/Serialization`
  [1a1011a3] SharedArrays `@stdlib/SharedArrays`
  [6462fe0b] Sockets `@stdlib/Sockets`
  [2f01184e] SparseArrays `@stdlib/SparseArrays`
  [10745b16] Statistics `@stdlib/Statistics`
  [fa267f1f] TOML v1.0.0 `@stdlib/TOML`
  [a4e569a6] Tar v1.10.0 `@stdlib/Tar`
  [8dfed614] Test `@stdlib/Test`
  [cf7118a7] UUIDs `@stdlib/UUIDs`
  [4ec0a83e] Unicode `@stdlib/Unicode`
  [e66e0078] CompilerSupportLibraries_jll v0.5.0+0 `@stdlib/CompilerSupportLibraries_jll`
  [deac9b47] LibCURL_jll v7.81.0+0 `@stdlib/LibCURL_jll`
  [29816b5a] LibSSH2_jll v1.10.2+0 `@stdlib/LibSSH2_jll`
  [c8ffd9c3] MbedTLS_jll v2.28.0+0 `@stdlib/MbedTLS_jll`
  [14a3606d] MozillaCACerts_jll v2022.2.1 `@stdlib/MozillaCACerts_jll`
  [4536629a] OpenBLAS_jll v0.3.17+2 `@stdlib/OpenBLAS_jll`
  [83775a58] Zlib_jll v1.2.12+1 `@stdlib/Zlib_jll`
  [8e850b90] libblastrampoline_jll v5.0.1+0 `@stdlib/libblastrampoline_jll`
  [8e850ede] nghttp2_jll v1.41.0+1 `@stdlib/nghttp2_jll`
  [3f19e933] p7zip_jll v16.2.1+1 `@stdlib/p7zip_jll`
Precompiling project...
  6 dependencies successfully precompiled in 28 seconds. 10 already precompiled.
     Testing Running tests...
Running /Users/fons/.julia/packages/HTTP/aTjcj/src/../test/ascii.jl tests...
Running /Users/fons/.julia/packages/HTTP/aTjcj/src/../test/chunking.jl tests...
Running /Users/fons/.julia/packages/HTTP/aTjcj/src/../test/utils.jl tests...
Running /Users/fons/.julia/packages/HTTP/aTjcj/src/../test/client.jl tests...
client transfer-encoding chunked
client transfer-encoding chunked
Running /Users/fons/.julia/packages/HTTP/aTjcj/src/../test/multipart.jl tests...
Running /Users/fons/.julia/packages/HTTP/aTjcj/src/../test/parsemultipart.jl tests...
Running /Users/fons/.julia/packages/HTTP/aTjcj/src/../test/sniff.jl tests...
Running /Users/fons/.julia/packages/HTTP/aTjcj/src/../test/cookies.jl tests...
Running /Users/fons/.julia/packages/HTTP/aTjcj/src/../test/parser.jl tests...
WARNING: using Messages.status in module Main conflicts with an existing identifier.
Running /Users/fons/.julia/packages/HTTP/aTjcj/src/../test/loopback.jl tests...
📡  GET /echo HTTP/1.1
📡  GET /echo HTTP/1.1
📡  GET /echo HTTP/1.1
📡  GET /echo HTTP/1.1
📡  GET /delay10 HTTP/1.1
📡  PUT /delay10 HTTP/1.1
📡  PUT /abort HTTP/1.1
📡  GET /echo HTTP/1.1
📡  GET /abort HTTP/1.1
📡  GET /delay1 HTTP/1.1
📡  GET /delay2 HTTP/1.1
📡  GET /delay3 HTTP/1.1
📡  GET /delay4 HTTP/1.1
📡  GET /delay5 HTTP/1.1
t = 2.2551729679107666
📡  GET /delay1 HTTP/1.1
📡  GET /delay2 HTTP/1.1
📡  GET /delay3 HTTP/1.1
📡  GET /delay4 HTTP/1.1
📡  GET /delay5 HTTP/1.1
📡  GET /delay1 HTTP/1.1
📡  GET /delay2 HTTP/1.1
📡  GET /delay3 HTTP/1.1
📡  GET /delay4 HTTP/1.1
📡  GET /delay5 HTTP/1.1
📡  GET /delay1 HTTP/1.1
📡  GET /delay2 HTTP/1.1
📡  GET /delay3 HTTP/1.1
📡  GET /delay4 HTTP/1.1
📡  GET /delay5 HTTP/1.1
t = 0.6649160385131836
📡  GET /delay1 HTTP/1.1
📡  GET /delay2 HTTP/1.1
📡  GET /delay3 HTTP/1.1
📡  GET /delay4 HTTP/1.1
📡  GET /delay5 HTTP/1.1
t = 0.6890950202941895
📡  POST /delay1 HTTP/1.1
📡  GET /delay2 HTTP/1.1
📡  GET /delay3 HTTP/1.1
📡  GET /delay4 HTTP/1.1
📡  GET /delay5 HTTP/1.1
📡  GET /delay1 HTTP/1.1
📡  GET /delay2 HTTP/1.1
📡  POST /delay3 HTTP/1.1
📡  GET /delay4 HTTP/1.1
📡  GET /delay5 HTTP/1.1
Running /Users/fons/.julia/packages/HTTP/aTjcj/src/../test/websockets.jl tests...
Running /Users/fons/.julia/packages/HTTP/aTjcj/src/../test/messages.jl tests...
GET /ip HTTP/1.1
HTTP/1.1 200 OK <= (GET /ip HTTP/1.1)
HEAD /ip HTTP/1.1
HTTP/1.1 200 OK <= (HEAD /ip HTTP/1.1)
OPTIONS /ip HTTP/1.1
HTTP/1.1 200 OK <= (OPTIONS /ip HTTP/1.1)
GET /ip HTTP/1.1
HTTP/1.1 200 OK <= (GET /ip HTTP/1.1)
HEAD /ip HTTP/1.1
HTTP/1.1 200 OK <= (HEAD /ip HTTP/1.1)
OPTIONS /ip HTTP/1.1
HTTP/1.1 200 OK <= (OPTIONS /ip HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
PUT /put HTTP/1.1
HTTP/1.1 200 OK <= (PUT /put HTTP/1.1)
PUT /put HTTP/1.1
HTTP/1.1 200 OK <= (PUT /put HTTP/1.1)
DELETE /delete HTTP/1.1
HTTP/1.1 200 OK <= (DELETE /delete HTTP/1.1)
DELETE /delete HTTP/1.1
HTTP/1.1 200 OK <= (DELETE /delete HTTP/1.1)
PATCH /patch HTTP/1.1
HTTP/1.1 200 OK <= (PATCH /patch HTTP/1.1)
PATCH /patch HTTP/1.1
HTTP/1.1 200 OK <= (PATCH /patch HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
PUT /put HTTP/1.1
HTTP/1.1 200 OK <= (PUT /put HTTP/1.1)
PUT /put HTTP/1.1
HTTP/1.1 200 OK <= (PUT /put HTTP/1.1)
DELETE /delete HTTP/1.1
HTTP/1.1 200 OK <= (DELETE /delete HTTP/1.1)
DELETE /delete HTTP/1.1
HTTP/1.1 200 OK <= (DELETE /delete HTTP/1.1)
PATCH /patch HTTP/1.1
HTTP/1.1 200 OK <= (PATCH /patch HTTP/1.1)
PATCH /patch HTTP/1.1
HTTP/1.1 200 OK <= (PATCH /patch HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
PUT /put HTTP/1.1
HTTP/1.1 200 OK <= (PUT /put HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
DELETE /delete HTTP/1.1
HTTP/1.1 200 OK <= (DELETE /delete HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
PATCH /patch HTTP/1.1
HTTP/1.1 200 OK <= (PATCH /patch HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
PUT /put HTTP/1.1
HTTP/1.1 200 OK <= (PUT /put HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
DELETE /delete HTTP/1.1
HTTP/1.1 200 OK <= (DELETE /delete HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
PATCH /patch HTTP/1.1
HTTP/1.1 200 OK <= (PATCH /patch HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
GET /stream/50 HTTP/1.1
HTTP/1.1 200 OK <= (GET /stream/50 HTTP/1.1)
Running /Users/fons/.julia/packages/HTTP/aTjcj/src/../test/handlers.jl tests...
Running /Users/fons/.julia/packages/HTTP/aTjcj/src/../test/server.jl tests...
length(x) = 100018
client:
HTTP/1.1 200 OK
Transfer-Encoding: chunked

f
Body of Request
0


[ Info: Listening on: 127.0.0.1:8088
client = "HTTP/1.1 200 OK\r\n\r\nHello"
Testing server port reuse
Starting second server listening on same port
Starting server on same port without port reuse (throws error)
[ Info: Listening on: 127.0.0.1:8092
┌ Warning: unable to accept new connection
└ @ HTTP.Servers ~/.julia/packages/HTTP/aTjcj/src/Servers.jl:292
┌ Warning: unable to accept new connection
└ @ HTTP.Servers ~/.julia/packages/HTTP/aTjcj/src/Servers.jl:292
┌ Warning: unable to accept new connection
└ @ HTTP.Servers ~/.julia/packages/HTTP/aTjcj/src/Servers.jl:292
┌ Warning: unable to accept new connection
└ @ HTTP.Servers ~/.julia/packages/HTTP/aTjcj/src/Servers.jl:292
┌ Warning: unable to accept new connection
└ @ HTTP.Servers ~/.julia/packages/HTTP/aTjcj/src/Servers.jl:292
access logging: Error During Test at /Users/fons/.julia/packages/HTTP/aTjcj/test/server.jl:274
  Got exception outside of a @test
  StatusError(404, "HEAD", "/", Response:
  """
  HTTP/1.1 404 Not Found
  Content-Length: 0
  Referrer-Policy: same-origin
  Server: Pluto.jl/0.18.1 Julia/1.7.0
  
  """)
  Stacktrace:
    [1] request(::Type{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}, ::URI, ::Vararg{Any}; kw::Base.Pairs{Symbol, Union{Nothing, Bool}, Tuple{Symbol, Symbol}, NamedTuple{(:iofunction, :reached_redirect_limit), Tuple{Nothing, Bool}}})
      @ HTTP.ExceptionRequest ~/.julia/packages/HTTP/aTjcj/src/ExceptionRequest.jl:22
    [2] (::Base.var"#86#88"{Base.var"#86#87#89"{ExponentialBackOff, HTTP.RetryRequest.var"#2#3"{Bool, Request}, typeof(request)}})(::Type, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{Nothing, Bool}, Tuple{Symbol, Symbol}, NamedTuple{(:iofunction, :reached_redirect_limit), Tuple{Nothing, Bool}}})
      @ Base ./error.jl:296
    [3] #request#1
      @ ~/.julia/packages/HTTP/aTjcj/src/RetryRequest.jl:44 [inlined]
    [4] request(::Type{MessageLayer{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}}, method::String, url::URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}; http_version::VersionNumber, target::String, parent::Nothing, iofunction::Nothing, kw::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:reached_redirect_limit,), Tuple{Bool}}})
      @ HTTP.MessageRequest ~/.julia/packages/HTTP/aTjcj/src/MessageRequest.jl:66
    [5] request(::Type{BasicAuthLayer{MessageLayer{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}}}, method::String, url::URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}; kw::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:reached_redirect_limit,), Tuple{Bool}}})
      @ HTTP.BasicAuthRequest ~/.julia/packages/HTTP/aTjcj/src/BasicAuthRequest.jl:28
    [6] request(::Type{RedirectLayer{BasicAuthLayer{MessageLayer{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}}}}, method::String, url::URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}; redirect_limit::Int64, forwardheaders::Bool, kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
      @ HTTP.RedirectRequest ~/.julia/packages/HTTP/aTjcj/src/RedirectRequest.jl:28
    [7] request
      @ ~/.julia/packages/HTTP/aTjcj/src/RedirectRequest.jl:21 [inlined]
    [8] #request#1
      @ ~/.julia/packages/HTTP/aTjcj/src/TopRequest.jl:15 [inlined]
    [9] request(::Type{TopLayer{RedirectLayer{BasicAuthLayer{MessageLayer{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}}}}}, ::String, ::URI, ::Vector{Pair{SubString{String}, SubString{String}}}, ::Vector{UInt8})
      @ HTTP.TopRequest ~/.julia/packages/HTTP/aTjcj/src/TopRequest.jl:15
   [10] request(method::String, url::String, h::Vector{Pair{SubString{String}, SubString{String}}}, b::Vector{UInt8}; headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}, query::Nothing, kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
      @ HTTP ~/.julia/packages/HTTP/aTjcj/src/HTTP.jl:330
   [11] request (repeats 2 times)
      @ ~/.julia/packages/HTTP/aTjcj/src/HTTP.jl:330 [inlined]
   [12] #head#21
      @ ~/.julia/packages/HTTP/aTjcj/src/HTTP.jl:435 [inlined]
   [13] head
      @ ~/.julia/packages/HTTP/aTjcj/src/HTTP.jl:435 [inlined]
   [14] (::Main.test_server.var"#44#56")()
      @ Main.test_server ~/.julia/packages/HTTP/aTjcj/test/server.jl:314
   [15] (::Main.test_server.var"#with_testserver#52"{Main.test_server.var"#handler#51"})(f::Main.test_server.var"#44#56", fmt::Function)
      @ Main.test_server ~/.julia/packages/HTTP/aTjcj/test/server.jl:302
   [16] macro expansion
      @ ~/.julia/packages/HTTP/aTjcj/test/server.jl:310 [inlined]
   [17] macro expansion
      @ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:1357 [inlined]
   [18] top-level scope
      @ ~/.julia/packages/HTTP/aTjcj/test/server.jl:275
   [19] include
      @ ./client.jl:476 [inlined]
   [20] macro expansion
      @ ~/.julia/packages/HTTP/aTjcj/test/runtests.jl:30 [inlined]
   [21] macro expansion
      @ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:1357 [inlined]
   [22] top-level scope
      @ ~/.julia/packages/HTTP/aTjcj/test/runtests.jl:7
   [23] include(fname::String)
      @ Base.MainInclude ./client.jl:476
   [24] top-level scope
      @ none:6
   [25] eval
      @ ./boot.jl:368 [inlined]
   [26] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:276
   [27] _start()
      @ Base ./client.jl:522
Running /Users/fons/.julia/packages/HTTP/aTjcj/src/../test/async.jl tests...
┌ Error: non-200 response
│   response =
│    Response:
│    """
│    HTTP/1.1 502 Bad Gateway
│    Server: awselb/2.0
│    Date: Mon, 07 Mar 2022 22:36:06 GMT
│    Content-Type: text/html
│    Content-Length: 122
│    Connection: keep-alive
│    
│    <html>
│    <head><title>502 Bad Gateway</title></head>
│    <body>
│    <center><h1>502 Bad Gateway</h1></cente
│    ⋮
│    122-byte body
│    """
└ @ Main.test_async ~/.julia/packages/HTTP/aTjcj/test/async.jl:50
 96.838809 seconds (6.10 M allocations: 450.168 MiB, 0.23% gc time, 4.65% compilation time)
Running /Users/fons/.julia/packages/HTTP/aTjcj/src/../test/aws4.jl tests...
Running /Users/fons/.julia/packages/HTTP/aTjcj/src/../test/insert_layers.jl tests...
Running /Users/fons/.julia/packages/HTTP/aTjcj/src/../test/mwe.jl tests...
Test Summary:                                                      | Pass  Error  Broken  Total     Time
HTTP                                                               | 4814      1     133   4948  3m53.5s
  ascii.jl                                                         |  648                   648     0.0s
  Chunking                                                         |   15                    15    14.0s
  utils.jl                                                         |   36                    36     0.5s
  debug.jl                                                         |    2                     2     0.0s
  Custom HTTP Stack                                                |    1                     1     2.0s
  Client.jl - http                                                 |   43             12     55    18.8s
  Client.jl - https                                                |   43             12     55     8.8s
  HTTP.open accepts method::Symbol                                 |    1                     1     0.9s
  readtimeout                                                      |    1                     1     3.2s
  Retry all resolved IP addresses                                  |    4                     4     0.3s
  Sockets.get(sock|peer)name(::HTTP.Stream)                        |    8                     8     2.5s
  input verification of bad URLs                                   |    3                     3     0.0s
  Implicit request headers                                         |    7                     7     0.8s
  NetworkOptions for host verification                             |   15                    15     2.4s
  Public entry point of HTTP.request and friends (e.g. issue #463) |  205                   205    13.1s
  HTTP CONNECT Proxy                                               |    1                     1     0.7s
  HTTP.Form for multipart/form-data                                |   20                    20     2.0s
  parse multipart form-data                                        |   33                    33     0.4s
  sniff.jl                                                         |   53                    53     0.8s
  Cookies                                                          |   62                    62     1.4s
  HTTP.parser                                                      |  727            106    833     1.1s
  loopback                                                         |   51                    51    15.0s
  WebSockets                                                       |    9                     9     3.1s
  HTTP.Messages                                                    |  234                   234    10.4s
  Handlers                                                         |   31                    31     0.8s
  HTTP.listen                                                      |   45              2     47    16.3s
  HTTP.listen: rate_limit                                          |    8                     8     3.7s
  on_shutdown                                                      |    5                     5     0.2s
  access logging                                                   |           1              1     1.8s
  ASync                                                            | 2399                  2399  1m36.8s
  AWS Signature Version 4                                          |   96                    96     2.5s
  HTTP Stack Inserting                                             |    8                     8     0.9s
ERROR: LoadError: Some tests did not pass: 4814 passed, 0 failed, 1 errored, 133 broken.
in expression starting at /Users/fons/.julia/packages/HTTP/aTjcj/test/runtests.jl:6
ERROR: Package HTTP errored during testing

(jl_tfkHKp) pkg> 

Let me know if this HTTP test failure is helpful. (There are instructions on setting up CI for the 1.8.0 beta on discourse, it would be great if HTTP.jl would have that.) If not, I could work on turning my test failures into a MWE...

Versions

  • CPU: GitHub Actions x86 Linux & local MacOS x86 (virtualized on M1)
  • Julia 1.8.0-beta1
  • HTTP.jl 0.9.17
  • MbedTLS.jl 1.0.3
@fredrikekre
Copy link
Member

Can you test with the master branch?

@fonsp
Copy link
Member Author

fonsp commented Mar 8, 2022

Same error

/Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia ; exit;
➜  ~ /Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia ; exit;
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.8.0-beta1 (2022-02-23)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.8) pkg> activate --temp
  Activating new project at `/var/folders/v_/fhpj9jn151d4p9c2fdw2gv780000gn/T/jl_WuiHJs`

(jl_WuiHJs) pkg> add HTTP#master
     Cloning git-repo `https://github.com/JuliaWeb/HTTP.jl.git`
    Updating git-repo `https://github.com/JuliaWeb/HTTP.jl.git`
    Updating registry at `~/.julia/registries/General.toml`
   Resolving package versions...
    Updating `/private/var/folders/v_/fhpj9jn151d4p9c2fdw2gv780000gn/T/jl_WuiHJs/Project.toml`
  [cd3eb016] + HTTP v0.9.17 `https://github.com/JuliaWeb/HTTP.jl.git#master`
    Updating `/private/var/folders/v_/fhpj9jn151d4p9c2fdw2gv780000gn/T/jl_WuiHJs/Manifest.toml`
  [cd3eb016] + HTTP v0.9.17 `https://github.com/JuliaWeb/HTTP.jl.git#master`
  [83e8ac13] + IniFile v0.5.1
  [739be429] + MbedTLS v1.0.3
  [5c2747f8] + URIs v1.3.0
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8f399da3] + Libdl
  [56ddb016] + Logging
  [ca575930] + NetworkOptions v1.2.0
  [de0858da] + Printf
  [9a3f8284] + Random
  [ea8e919c] + SHA v0.7.0
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [4ec0a83e] + Unicode
  [c8ffd9c3] + MbedTLS_jll v2.28.0+0
Precompiling project...
  1 dependency successfully precompiled in 3 seconds. 4 already precompiled.

(jl_WuiHJs) pkg> test HTTP
     Testing HTTP
      Status `/private/var/folders/v_/fhpj9jn151d4p9c2fdw2gv780000gn/T/jl_whliSZ/Project.toml`
  [e1450e63] BufferedStreams v1.0.0
  [cd3eb016] HTTP v0.9.17 `https://github.com/JuliaWeb/HTTP.jl.git#master`
  [83e8ac13] IniFile v0.5.1
  [682c06a0] JSON v0.21.3
  [739be429] MbedTLS v1.0.3
  [5c2747f8] URIs v1.3.0
  [1986cc42] Unitful v1.11.0
  [2a0f44e3] Base64 `@stdlib/Base64`
  [ade2ca70] Dates `@stdlib/Dates`
  [8ba89e20] Distributed `@stdlib/Distributed`
  [56ddb016] Logging `@stdlib/Logging`
  [ca575930] NetworkOptions v1.2.0 `@stdlib/NetworkOptions`
  [6462fe0b] Sockets `@stdlib/Sockets`
  [8dfed614] Test `@stdlib/Test`
      Status `/private/var/folders/v_/fhpj9jn151d4p9c2fdw2gv780000gn/T/jl_whliSZ/Manifest.toml`
  [e1450e63] BufferedStreams v1.0.0
  [34da2185] Compat v3.42.0
  [187b0558] ConstructionBase v1.3.0
  [cd3eb016] HTTP v0.9.17 `https://github.com/JuliaWeb/HTTP.jl.git#master`
  [83e8ac13] IniFile v0.5.1
  [682c06a0] JSON v0.21.3
  [739be429] MbedTLS v1.0.3
  [69de0a69] Parsers v2.2.3
  [5c2747f8] URIs v1.3.0
  [1986cc42] Unitful v1.11.0
  [0dad84c5] ArgTools v1.1.1 `@stdlib/ArgTools`
  [56f22d72] Artifacts `@stdlib/Artifacts`
  [2a0f44e3] Base64 `@stdlib/Base64`
  [ade2ca70] Dates `@stdlib/Dates`
  [8bb1440f] DelimitedFiles `@stdlib/DelimitedFiles`
  [8ba89e20] Distributed `@stdlib/Distributed`
  [f43a241f] Downloads v1.6.0 `@stdlib/Downloads`
  [7b1f6079] FileWatching `@stdlib/FileWatching`
  [b77e0a4c] InteractiveUtils `@stdlib/InteractiveUtils`
  [b27032c2] LibCURL v0.6.3 `@stdlib/LibCURL`
  [76f85450] LibGit2 `@stdlib/LibGit2`
  [8f399da3] Libdl `@stdlib/Libdl`
  [37e2e46d] LinearAlgebra `@stdlib/LinearAlgebra`
  [56ddb016] Logging `@stdlib/Logging`
  [d6f4376e] Markdown `@stdlib/Markdown`
  [a63ad114] Mmap `@stdlib/Mmap`
  [ca575930] NetworkOptions v1.2.0 `@stdlib/NetworkOptions`
  [44cfe95a] Pkg v1.8.0 `@stdlib/Pkg`
  [de0858da] Printf `@stdlib/Printf`
  [3fa0cd96] REPL `@stdlib/REPL`
  [9a3f8284] Random `@stdlib/Random`
  [ea8e919c] SHA v0.7.0 `@stdlib/SHA`
  [9e88b42a] Serialization `@stdlib/Serialization`
  [1a1011a3] SharedArrays `@stdlib/SharedArrays`
  [6462fe0b] Sockets `@stdlib/Sockets`
  [2f01184e] SparseArrays `@stdlib/SparseArrays`
  [10745b16] Statistics `@stdlib/Statistics`
  [fa267f1f] TOML v1.0.0 `@stdlib/TOML`
  [a4e569a6] Tar v1.10.0 `@stdlib/Tar`
  [8dfed614] Test `@stdlib/Test`
  [cf7118a7] UUIDs `@stdlib/UUIDs`
  [4ec0a83e] Unicode `@stdlib/Unicode`
  [e66e0078] CompilerSupportLibraries_jll v0.5.0+0 `@stdlib/CompilerSupportLibraries_jll`
  [deac9b47] LibCURL_jll v7.81.0+0 `@stdlib/LibCURL_jll`
  [29816b5a] LibSSH2_jll v1.10.2+0 `@stdlib/LibSSH2_jll`
  [c8ffd9c3] MbedTLS_jll v2.28.0+0 `@stdlib/MbedTLS_jll`
  [14a3606d] MozillaCACerts_jll v2022.2.1 `@stdlib/MozillaCACerts_jll`
  [4536629a] OpenBLAS_jll v0.3.17+2 `@stdlib/OpenBLAS_jll`
  [83775a58] Zlib_jll v1.2.12+1 `@stdlib/Zlib_jll`
  [8e850b90] libblastrampoline_jll v5.0.1+0 `@stdlib/libblastrampoline_jll`
  [8e850ede] nghttp2_jll v1.41.0+1 `@stdlib/nghttp2_jll`
  [3f19e933] p7zip_jll v16.2.1+1 `@stdlib/p7zip_jll`
     Testing Running tests...
Running /Users/fons/.julia/packages/HTTP/hMEeH/src/../test/ascii.jl tests...
Running /Users/fons/.julia/packages/HTTP/hMEeH/src/../test/chunking.jl tests...
Running /Users/fons/.julia/packages/HTTP/hMEeH/src/../test/utils.jl tests...
Running /Users/fons/.julia/packages/HTTP/hMEeH/src/../test/client.jl tests...
client transfer-encoding chunked
client transfer-encoding chunked
Running /Users/fons/.julia/packages/HTTP/hMEeH/src/../test/multipart.jl tests...
Running /Users/fons/.julia/packages/HTTP/hMEeH/src/../test/parsemultipart.jl tests...
Running /Users/fons/.julia/packages/HTTP/hMEeH/src/../test/sniff.jl tests...
Running /Users/fons/.julia/packages/HTTP/hMEeH/src/../test/cookies.jl tests...
Running /Users/fons/.julia/packages/HTTP/hMEeH/src/../test/parser.jl tests...
WARNING: using Messages.status in module Main conflicts with an existing identifier.
Running /Users/fons/.julia/packages/HTTP/hMEeH/src/../test/loopback.jl tests...
📡  GET /echo HTTP/1.1
📡  GET /echo HTTP/1.1
📡  GET /echo HTTP/1.1
📡  GET /echo HTTP/1.1
📡  GET /delay10 HTTP/1.1
📡  PUT /delay10 HTTP/1.1
📡  PUT /abort HTTP/1.1
📡  GET /echo HTTP/1.1
📡  GET /abort HTTP/1.1
📡  GET /delay1 HTTP/1.1
📡  GET /delay2 HTTP/1.1
📡  GET /delay3 HTTP/1.1
📡  GET /delay4 HTTP/1.1
📡  GET /delay5 HTTP/1.1
t = 2.1855969429016113
📡  GET /delay1 HTTP/1.1
📡  GET /delay2 HTTP/1.1
📡  GET /delay3 HTTP/1.1
📡  GET /delay4 HTTP/1.1
📡  GET /delay5 HTTP/1.1
t = 1.7080349922180176
📡  POST /delay1 HTTP/1.1
📡  GET /delay2 HTTP/1.1
📡  GET /delay3 HTTP/1.1
📡  GET /delay4 HTTP/1.1
📡  GET /delay5 HTTP/1.1
Running /Users/fons/.julia/packages/HTTP/hMEeH/src/../test/websockets.jl tests...
Running /Users/fons/.julia/packages/HTTP/hMEeH/src/../test/messages.jl tests...
GET /ip HTTP/1.1
HTTP/1.1 200 OK <= (GET /ip HTTP/1.1)
HEAD /ip HTTP/1.1
HTTP/1.1 200 OK <= (HEAD /ip HTTP/1.1)
OPTIONS /ip HTTP/1.1
HTTP/1.1 200 OK <= (OPTIONS /ip HTTP/1.1)
GET /ip HTTP/1.1
HTTP/1.1 200 OK <= (GET /ip HTTP/1.1)
HEAD /ip HTTP/1.1
HTTP/1.1 200 OK <= (HEAD /ip HTTP/1.1)
OPTIONS /ip HTTP/1.1
HTTP/1.1 200 OK <= (OPTIONS /ip HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
PUT /put HTTP/1.1
HTTP/1.1 200 OK <= (PUT /put HTTP/1.1)
PUT /put HTTP/1.1
HTTP/1.1 200 OK <= (PUT /put HTTP/1.1)
DELETE /delete HTTP/1.1
HTTP/1.1 200 OK <= (DELETE /delete HTTP/1.1)
DELETE /delete HTTP/1.1
HTTP/1.1 200 OK <= (DELETE /delete HTTP/1.1)
PATCH /patch HTTP/1.1
HTTP/1.1 200 OK <= (PATCH /patch HTTP/1.1)
PATCH /patch HTTP/1.1
HTTP/1.1 200 OK <= (PATCH /patch HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
PUT /put HTTP/1.1
HTTP/1.1 200 OK <= (PUT /put HTTP/1.1)
PUT /put HTTP/1.1
HTTP/1.1 200 OK <= (PUT /put HTTP/1.1)
DELETE /delete HTTP/1.1
HTTP/1.1 200 OK <= (DELETE /delete HTTP/1.1)
DELETE /delete HTTP/1.1
HTTP/1.1 200 OK <= (DELETE /delete HTTP/1.1)
PATCH /patch HTTP/1.1
HTTP/1.1 200 OK <= (PATCH /patch HTTP/1.1)
PATCH /patch HTTP/1.1
HTTP/1.1 200 OK <= (PATCH /patch HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
PUT /put HTTP/1.1
HTTP/1.1 200 OK <= (PUT /put HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
DELETE /delete HTTP/1.1
HTTP/1.1 200 OK <= (DELETE /delete HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
PATCH /patch HTTP/1.1
HTTP/1.1 200 OK <= (PATCH /patch HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
PUT /put HTTP/1.1
HTTP/1.1 200 OK <= (PUT /put HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
DELETE /delete HTTP/1.1
HTTP/1.1 200 OK <= (DELETE /delete HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
PATCH /patch HTTP/1.1
HTTP/1.1 200 OK <= (PATCH /patch HTTP/1.1)
POST /post HTTP/1.1
HTTP/1.1 200 OK <= (POST /post HTTP/1.1)
GET /stream/50 HTTP/1.1
HTTP/1.1 200 OK <= (GET /stream/50 HTTP/1.1)
Running /Users/fons/.julia/packages/HTTP/hMEeH/src/../test/handlers.jl tests...
Running /Users/fons/.julia/packages/HTTP/hMEeH/src/../test/server.jl tests...
length(x) = 100018
client:
HTTP/1.1 200 OK
Transfer-Encoding: chunked

f
Body of Request
0


[ Info: Listening on: 127.0.0.1:8088
Testing server port reuse
Starting second server listening on same port
Starting server on same port without port reuse (throws error)
[ Info: Listening on: 127.0.0.1:8092
┌ Warning: unable to accept new connection
└ @ HTTP.Servers ~/.julia/packages/HTTP/hMEeH/src/Servers.jl:292
┌ Warning: unable to accept new connection
└ @ HTTP.Servers ~/.julia/packages/HTTP/hMEeH/src/Servers.jl:292
┌ Warning: unable to accept new connection
└ @ HTTP.Servers ~/.julia/packages/HTTP/hMEeH/src/Servers.jl:292
┌ Warning: unable to accept new connection
└ @ HTTP.Servers ~/.julia/packages/HTTP/hMEeH/src/Servers.jl:292
┌ Warning: unable to accept new connection
└ @ HTTP.Servers ~/.julia/packages/HTTP/hMEeH/src/Servers.jl:292
access logging: Error During Test at /Users/fons/.julia/packages/HTTP/hMEeH/test/server.jl:291
  Got exception outside of a @test
  StatusError(404, "HEAD", "/", Response:
  """
  HTTP/1.1 404 Not Found
  Content-Length: 0
  Referrer-Policy: same-origin
  Server: Pluto.jl/0.18.1 Julia/1.7.0
  
  """)
  Stacktrace:
    [1] request(::Type{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}, ::URI, ::Vararg{Any}; kw::Base.Pairs{Symbol, Union{Nothing, Bool}, Tuple{Symbol, Symbol}, NamedTuple{(:iofunction, :reached_redirect_limit), Tuple{Nothing, Bool}}})
      @ HTTP.ExceptionRequest ~/.julia/packages/HTTP/hMEeH/src/ExceptionRequest.jl:22
    [2] (::Base.var"#86#88"{Base.var"#86#87#89"{ExponentialBackOff, HTTP.RetryRequest.var"#2#3"{Bool, Request}, typeof(request)}})(::Type, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{Nothing, Bool}, Tuple{Symbol, Symbol}, NamedTuple{(:iofunction, :reached_redirect_limit), Tuple{Nothing, Bool}}})
      @ Base ./error.jl:296
    [3] #request#1
      @ ~/.julia/packages/HTTP/hMEeH/src/RetryRequest.jl:44 [inlined]
    [4] request(::Type{MessageLayer{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}}, method::String, url::URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}; http_version::VersionNumber, target::String, parent::Nothing, iofunction::Nothing, kw::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:reached_redirect_limit,), Tuple{Bool}}})
      @ HTTP.MessageRequest ~/.julia/packages/HTTP/hMEeH/src/MessageRequest.jl:66
    [5] request(::Type{BasicAuthLayer{MessageLayer{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}}}, method::String, url::URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}; kw::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:reached_redirect_limit,), Tuple{Bool}}})
      @ HTTP.BasicAuthRequest ~/.julia/packages/HTTP/hMEeH/src/BasicAuthRequest.jl:28
    [6] request(::Type{RedirectLayer{BasicAuthLayer{MessageLayer{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}}}}, method::String, url::URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}; redirect_limit::Int64, forwardheaders::Bool, kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
      @ HTTP.RedirectRequest ~/.julia/packages/HTTP/hMEeH/src/RedirectRequest.jl:28
    [7] request
      @ ~/.julia/packages/HTTP/hMEeH/src/RedirectRequest.jl:21 [inlined]
    [8] #request#1
      @ ~/.julia/packages/HTTP/hMEeH/src/TopRequest.jl:15 [inlined]
    [9] request(::Type{TopLayer{RedirectLayer{BasicAuthLayer{MessageLayer{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}}}}}, ::String, ::URI, ::Vector{Pair{SubString{String}, SubString{String}}}, ::Vector{UInt8})
      @ HTTP.TopRequest ~/.julia/packages/HTTP/hMEeH/src/TopRequest.jl:15
   [10] request(method::String, url::String, h::Vector{Pair{SubString{String}, SubString{String}}}, b::Vector{UInt8}; headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}, query::Nothing, kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
      @ HTTP ~/.julia/packages/HTTP/hMEeH/src/HTTP.jl:327
   [11] request (repeats 2 times)
      @ ~/.julia/packages/HTTP/hMEeH/src/HTTP.jl:327 [inlined]
   [12] #head#21
      @ ~/.julia/packages/HTTP/hMEeH/src/HTTP.jl:432 [inlined]
   [13] head
      @ ~/.julia/packages/HTTP/hMEeH/src/HTTP.jl:432 [inlined]
   [14] (::Main.test_server.var"#44#56")()
      @ Main.test_server ~/.julia/packages/HTTP/hMEeH/test/server.jl:331
   [15] (::Main.test_server.var"#with_testserver#52"{Main.test_server.var"#handler#51"})(f::Main.test_server.var"#44#56", fmt::Function)
      @ Main.test_server ~/.julia/packages/HTTP/hMEeH/test/server.jl:319
   [16] macro expansion
      @ ~/.julia/packages/HTTP/hMEeH/test/server.jl:327 [inlined]
   [17] macro expansion
      @ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:1357 [inlined]
   [18] top-level scope
      @ ~/.julia/packages/HTTP/hMEeH/test/server.jl:292
   [19] include
      @ ./client.jl:476 [inlined]
   [20] macro expansion
      @ ~/.julia/packages/HTTP/hMEeH/test/runtests.jl:30 [inlined]
   [21] macro expansion
      @ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:1357 [inlined]
   [22] top-level scope
      @ ~/.julia/packages/HTTP/hMEeH/test/runtests.jl:7
   [23] include(fname::String)
      @ Base.MainInclude ./client.jl:476
   [24] top-level scope
      @ none:6
   [25] eval
      @ ./boot.jl:368 [inlined]
   [26] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:276
   [27] _start()
      @ Base ./client.jl:522
Running /Users/fons/.julia/packages/HTTP/hMEeH/src/../test/async.jl tests...
102.231861 seconds (6.61 M allocations: 454.286 MiB, 0.30% gc time, 5.01% compilation time)
Running /Users/fons/.julia/packages/HTTP/hMEeH/src/../test/aws4.jl tests...
Running /Users/fons/.julia/packages/HTTP/hMEeH/src/../test/insert_layers.jl tests...
Running /Users/fons/.julia/packages/HTTP/hMEeH/src/../test/mwe.jl tests...
Test Summary:                                                      | Pass  Error  Broken  Total     Time
HTTP                                                               | 4793      1     133   4927  3m52.4s
  ascii.jl                                                         |  648                   648     0.0s
  Chunking                                                         |   15                    15    13.3s
  utils.jl                                                         |   36                    36     0.5s
  debug.jl                                                         |    2                     2     0.0s
  Custom HTTP Stack                                                |    1                     1     1.3s
  Client.jl - http                                                 |   43             12     55    17.5s
  Client.jl - https                                                |   43             12     55     8.8s
  HTTP.open accepts method::Symbol                                 |    1                     1     0.7s
  readtimeout                                                      |    1                     1     2.8s
  Retry all resolved IP addresses                                  |    4                     4     0.2s
  Sockets.get(sock|peer)name(::HTTP.Stream)                        |    8                     8     1.7s
  input verification of bad URLs                                   |    3                     3     0.0s
  Implicit request headers                                         |    7                     7     0.7s
  NetworkOptions for host verification                             |   15                    15     2.2s
  Public entry point of HTTP.request and friends (e.g. issue #463) |  205                   205    12.9s
  HTTP CONNECT Proxy                                               |    1                     1     0.7s
  HTTP.Form for multipart/form-data                                |   18                    18     2.0s
  parse multipart form-data                                        |   33                    33     0.4s
  sniff.jl                                                         |   53                    53     0.8s
  Cookies                                                          |   62                    62     1.3s
  HTTP.parser                                                      |  727            106    833     0.7s
  loopback                                                         |   30                    30    12.8s
  WebSockets                                                       |    9                     9     3.0s
  HTTP.Messages                                                    |  234                   234     9.4s
  Handlers                                                         |   31                    31     0.7s
  HTTP.listen                                                      |   45              2     47    18.4s
  HTTP.listen: rate_limit                                          |    9                     9     4.3s
  on_shutdown                                                      |    5                     5     0.3s
  access logging                                                   |           1              1     1.5s
  ASync                                                            | 2400                  2400  1m42.2s
  AWS Signature Version 4                                          |   96                    96     2.4s
  HTTP Stack Inserting                                             |    8                     8     0.9s
ERROR: LoadError: Some tests did not pass: 4793 passed, 0 failed, 1 errored, 133 broken.
in expression starting at /Users/fons/.julia/packages/HTTP/hMEeH/test/runtests.jl:6
ERROR: Package HTTP errored during testing

(jl_WuiHJs) pkg> 

fonsp added a commit to JuliaPluto/PlutoSliderServer.jl that referenced this issue Mar 8, 2022
@fredrikekre
Copy link
Member

Server: Pluto.jl/0.18.1 Julia/1.7.0

Why does it say that? Must be something on your system, perhaps you are already running a server on the port that HTTP.jl tries to use in the tests? I can't replicate the error on my machine.

@fredrikekre
Copy link
Member

I believe the problem is how you dynamically generate the router in PlutoSliderServer. It never seens the new endpoints and always just hits the fallback. This diff makes test pass for me

$ git diff
diff --git a/src/PlutoSliderServer.jl b/src/PlutoSliderServer.jl
index 72f7ce4..ea84a41 100644
--- a/src/PlutoSliderServer.jl
+++ b/src/PlutoSliderServer.jl
@@ -280,7 +280,7 @@ function run_directory(
 
             params = HTTP.queryparams(HTTP.URI(request.target))
 
-            response_body = HTTP.handle(router, request)
+            response_body = Base.@invokelatest HTTP.handle(router, request)
 
             request.response::HTTP.Response = response_body
             request.response.request = request

@fonsp
Copy link
Member Author

fonsp commented Mar 8, 2022

I see, thanks so much fredrik!

This isn't the first time that the router got me confused, but it looks like this will improve in the future: #786 (comment)

I will close this and leave the HTTP.jl test failures up to you :) I might be able to help with improving the stability of the HTTP.jl tests if you think I that would be welcome? Right now the tests seem to fail quite often, which makes me worried about using HTTP.jl in other projects.

Thanks again!

@fonsp fonsp closed this as completed Mar 8, 2022
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

2 participants