Skip to content
This repository was archived by the owner on Mar 16, 2021. It is now read-only.

Commit 0d40976

Browse files
committed
Merged by hand, many of these changes were already made.
1 parent 86365c3 commit 0d40976

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/AWS4AuthRequest.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module AWS4AuthRequest
22

3-
using Base64
4-
using Dates
5-
using Unicode
3+
using ..Base64
4+
using ..Dates
5+
using ..Unicode
66
using MbedTLS: digest, MD_SHA256, MD_MD5
77
import ..Layer, ..request, ..Headers
88
using ..URIs
@@ -27,10 +27,12 @@ export AWS4AuthLayer
2727
function request(::Type{AWS4AuthLayer{Next}},
2828
uri::URI, req, body; kw...) where Next
2929

30+
@static if VERSION > v"0.7.0-DEV.2915"
3031
if !haskey(kw, :aws_access_key_id) &&
3132
!haskey(ENV, "AWS_ACCESS_KEY_ID")
3233
kw = merge(dot_aws_credentials(), kw)
3334
end
35+
end
3436

3537
sign_aws4!(req.method, uri, req.headers, req.body; kw...)
3638

@@ -117,6 +119,7 @@ function sign_aws4!(method::String,
117119
))
118120
end
119121

122+
@static if VERSION > v"0.7.0-DEV.2915"
120123

121124
using IniFile
122125

@@ -148,5 +151,6 @@ function dot_aws_credentials()::NamedTuple
148151
aws_secret_access_key = String(get(ini, p, "aws_secret_access_key")))
149152
end
150153

154+
end
151155

152156
end # module AWS4AuthRequest

0 commit comments

Comments
 (0)