fix: encoding of basic auth header values
This commit is contained in:
parent
527dd7b604
commit
d7d7daab2d
3 changed files with 12 additions and 3 deletions
|
@ -30,7 +30,7 @@ type RequestAuthorization func(*http.Request)
|
|||
|
||||
func AuthorizeBasic(user, password string) RequestAuthorization {
|
||||
return func(req *http.Request) {
|
||||
req.SetBasicAuth(user, password)
|
||||
req.SetBasicAuth(url.QueryEscape(user), url.QueryEscape(password))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue