Skip to content

Commit

Permalink
Accept empty credentials
Browse files Browse the repository at this point in the history
Accept empty credentials from the digest hook to allow custom request transformations without setting digest Authorization headers
  • Loading branch information
martende authored and Aleh Biruk committed Sep 29, 2021
1 parent 4ceae47 commit 038ab8e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ func (t *Transport) prepare(req *http.Request) error {
if err != nil {
return err
}
req.Header.Set("Authorization", cred.String())

if cred != nil {
req.Header.Set("Authorization", cred.String())
}

return nil
}

Expand Down

0 comments on commit 038ab8e

Please sign in to comment.