Skip to content

Commit 221087c

Browse files
committed
fix: digest auth handle qop values separated without spaces
The digest auth qop validation did only handle values separated like "auth, auth-int", but not "auth,auth-int".
1 parent 142b7dd commit 221087c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

digest.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,10 @@ func (c *credentials) validateQop() error {
263263
if c.messageQop == "" {
264264
return ErrDigestNoQop
265265
}
266-
possibleQops := strings.Split(c.messageQop, ", ")
266+
possibleQops := strings.Split(c.messageQop, ",")
267267
var authSupport bool
268268
for _, qop := range possibleQops {
269+
qop = strings.TrimSpace(qop)
269270
if qop == "auth" {
270271
authSupport = true
271272
break

0 commit comments

Comments
 (0)