Skip to content

Commit eba8c69

Browse files
authored
Merge pull request #14 from andygrunwald/fix_digest_method
A2 hash should use the request's method (closes #13)
2 parents 8534915 + d595c54 commit eba8c69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

authentication.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func (s *AuthenticationService) digestAuthHeader(response *http.Response) (strin
112112

113113
// A2
114114
h = md5.New()
115-
A2 := fmt.Sprintf("GET:%s", uriHeader)
115+
A2 := fmt.Sprintf("%s:%s", response.Request.Method, uriHeader)
116116
io.WriteString(h, A2)
117117
HA2 := fmt.Sprintf("%x", h.Sum(nil))
118118

0 commit comments

Comments
 (0)