Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
nkottary committed Nov 23, 2023
1 parent 69cf072 commit 311dc12
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/server.jl
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ const echostreamhandler = HTTP.streamhandler(echohandler)

# test that an Authorization header **is** forwarded to redirect in same domain
@test HTTP.hasheader(HTTP.get("https://$httpbin/redirect-to?url=https://$httpbin/response-headers?Authorization=auth"), "Authorization")

# test that Authorization header value is masked when `show`ing HTTP.Request
io = IOBuffer()
HTTP.show(io, HTTP.Request("GET", "https://xyz.com", ["Authorization" => "Basic abcdef12345"]))
@test !occursin("abcdef12345", String(io.data))

close(t1)

# 318
Expand Down

0 comments on commit 311dc12

Please sign in to comment.