Skip to content

Commit 8c294d8

Browse files
authored
Fix a few typos (#1109)
1 parent a5af1ed commit 8c294d8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/HTTP.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ as an additional keyword argument to the request.
113113
- any `AbstractString` or `AbstractVector{UInt8}` which will be sent "as is" for the request body
114114
- a readable `IO` stream or any `IO`-like type `T` for which
115115
`eof(T)` and `readavailable(T)` are defined. This stream will be read and sent until `eof` is `true`.
116-
This object should support the `mark`/`reset` methods if request retires are desired (if not, no retries will be attempted).
116+
This object should support the `mark`/`reset` methods if request retries are desired (if not, no retries will be attempted).
117117
- Any collection or iterable of the above (`AbstractDict`, `AbstractString`, `AbstractVector{UInt8}`, or `IO`)
118118
which will result in a "chunked" request body, where each iterated element will be sent as a separate chunk
119119
- a [`HTTP.Form`](@ref), which will be serialized as the "multipart/form-data" content-type

src/clientlayers/ConnectionRequest.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,22 +119,22 @@ function connectionlayer(handler)
119119
stream = Stream(req.response, io)
120120
return handler(stream; readtimeout=readtimeout, logerrors=logerrors, logtag=logtag, kw...)
121121
catch e
122+
shouldreuse = false
122123
# manually unwrap CompositeException since it's not defined as a "wrapper" exception by ExceptionUnwrapping
123124
while e isa CompositeException
124125
e = e.exceptions[1]
125126
end
126127
root_err = ExceptionUnwrapping.unwrap_exception_to_root(e)
127128
# don't log if it's an HTTPError since we should have already logged it
128-
if logerrors && err isa StatusError
129+
if logerrors && root_err isa StatusError
129130
err = current_exceptions_to_string()
130131
@error err type=Symbol("HTTP.StatusError") method=req.method url=req.url context=req.context logtag=logtag
131132
end
132133
if logerrors && !ExceptionUnwrapping.has_wrapped_exception(e, HTTPError)
133134
err = current_exceptions_to_string(e)
134135
@error err type=Symbol("HTTP.ConnectionRequest") method=req.method url=req.url context=req.context logtag=logtag
135136
end
136-
@debugv 1 "❗️ ConnectionLayer $e. Closing: $io"
137-
shouldreuse = false
137+
@debugv 1 "❗️ ConnectionLayer $root_err. Closing: $io"
138138
if @isdefined(stream) && stream.nwritten == -1
139139
# we didn't write anything, so don't need to worry about
140140
# idempotency of the request

0 commit comments

Comments
 (0)