Skip to content

Commit

Permalink
Compat
Browse files Browse the repository at this point in the history
  • Loading branch information
quinnj committed Dec 14, 2023
1 parent ce0032c commit 6bd015a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/HTTP2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ mutable struct Request
end
end

Base.getproperty(x::Request, s::Symbol) = s == :url ? x.uri : getfield(x, s)

#TODO: make a RequestMetrics that includes:
# request/response body sizes
# # of retries
Expand Down
2 changes: 0 additions & 2 deletions src/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,6 @@ function request(req::Request;
if ret != 0
# NOTE: we're manually creating an AWSError here because calling aws_error
# doesn't return anything useful, even though from the source code it should?
# we're also not seeing any logs from retry strategy code, so it seems like something
# isn't working quite right with the integration there
ctx.error = CapturedException(AWSError("scheduling retry failed: $(ctx.request.uri.host)"), Base.backtrace())
@goto error_fail
end
Expand Down
3 changes: 3 additions & 0 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ function deleteheader(h, k)
return
end

removeheader(h, k) = deleteheader(h, k)
isbytes(x) = x isa AbstractVector{UInt8} || x isa AbstractString

resource(uri::URI) = string( isempty(uri.path) ? "/" : uri.path,
!isempty(uri.query) ? "?" : "", uri.query,
!isempty(uri.fragment) ? "#" : "", uri.fragment)
Expand Down

0 comments on commit 6bd015a

Please sign in to comment.