Skip to content

Commit

Permalink
Fix a few typos (#1109)
Browse files Browse the repository at this point in the history
  • Loading branch information
quinnj authored Sep 9, 2023
1 parent a5af1ed commit 8c294d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/HTTP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ as an additional keyword argument to the request.
- any `AbstractString` or `AbstractVector{UInt8}` which will be sent "as is" for the request body
- a readable `IO` stream or any `IO`-like type `T` for which
`eof(T)` and `readavailable(T)` are defined. This stream will be read and sent until `eof` is `true`.
This object should support the `mark`/`reset` methods if request retires are desired (if not, no retries will be attempted).
This object should support the `mark`/`reset` methods if request retries are desired (if not, no retries will be attempted).
- Any collection or iterable of the above (`AbstractDict`, `AbstractString`, `AbstractVector{UInt8}`, or `IO`)
which will result in a "chunked" request body, where each iterated element will be sent as a separate chunk
- a [`HTTP.Form`](@ref), which will be serialized as the "multipart/form-data" content-type
Expand Down
6 changes: 3 additions & 3 deletions src/clientlayers/ConnectionRequest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,22 +119,22 @@ function connectionlayer(handler)
stream = Stream(req.response, io)
return handler(stream; readtimeout=readtimeout, logerrors=logerrors, logtag=logtag, kw...)
catch e
shouldreuse = false
# manually unwrap CompositeException since it's not defined as a "wrapper" exception by ExceptionUnwrapping
while e isa CompositeException
e = e.exceptions[1]
end
root_err = ExceptionUnwrapping.unwrap_exception_to_root(e)
# don't log if it's an HTTPError since we should have already logged it
if logerrors && err isa StatusError
if logerrors && root_err isa StatusError
err = current_exceptions_to_string()
@error err type=Symbol("HTTP.StatusError") method=req.method url=req.url context=req.context logtag=logtag
end
if logerrors && !ExceptionUnwrapping.has_wrapped_exception(e, HTTPError)
err = current_exceptions_to_string(e)
@error err type=Symbol("HTTP.ConnectionRequest") method=req.method url=req.url context=req.context logtag=logtag
end
@debugv 1 "❗️ ConnectionLayer $e. Closing: $io"
shouldreuse = false
@debugv 1 "❗️ ConnectionLayer $root_err. Closing: $io"
if @isdefined(stream) && stream.nwritten == -1
# we didn't write anything, so don't need to worry about
# idempotency of the request
Expand Down

0 comments on commit 8c294d8

Please sign in to comment.