Skip to content

Commit

Permalink
Don't eagerly write response body in case of redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
quinnj committed Apr 13, 2024
1 parent e27493d commit 44024b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/clientlayers/StreamRequest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ end

function readbody!(stream::Stream, res::Response, buf_or_stream, lock)
n = 0
if !iserror(res)
if !iserror(res) && !isredirect(res)
if isbytes(res.body)
if length(res.body) > 0
# user-provided buffer to read response body into
Expand Down

0 comments on commit 44024b4

Please sign in to comment.