Closed Octogonapus closed 7 months ago
I can not reproduce this. I tried for example
server = HTTP.listen!() do http
HTTP.setstatus(http, 200)
bytes_total = Int(typemax(Int32) + 1)
HTTP.setheader(http, "Content-Length" => string(bytes_total))
HTTP.startwrite(http)
io = open("/dev/random", "r")
bytes_written = 0
while bytes_written < bytes_total
toread = min(bytes_total - bytes_written, 1024^2)
chunk_size = write(http, read(io, toread))
bytes_written += chunk_size
end
end
HTTP.get("http://localhost:8081", response_stream = devnull)
Unfortunately HTTP.jl swallows the original stacktrace from the error e
here https://github.com/JuliaWeb/HTTP.jl/blob/57d57a513fd9caf689303f12b01e93f6859a2ec5/src/clientlayers/ConnectionRequest.jl#L121: and we only see the trace for https://github.com/JuliaWeb/HTTP.jl/blob/57d57a513fd9caf689303f12b01e93f6859a2ec5/src/clientlayers/ConnectionRequest.jl#L143
If you can still reproduce, perhaps try commenting out the catch block: https://github.com/JuliaWeb/HTTP.jl/blob/57d57a513fd9caf689303f12b01e93f6859a2ec5/src/clientlayers/ConnectionRequest.jl#L121-L144 and see what the original error is
huh I can't reproduce this either. not sure what is going on
We ran into a request error because of a large (2.28 GB) request body:
Note that the Content-Length
2281871749
is larger thantypemax(Int32)
.