Skip to content

Commit

Permalink
return boolean expression
Browse files Browse the repository at this point in the history
  • Loading branch information
icholy committed Jun 8, 2020
1 parent 59cc691 commit c4df5d0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions digest.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ func CanDigest(c *Challenge) bool {
default:
return false
}
if len(c.QOP) > 0 && !c.SupportsQOP("auth") {
return false
}
return true
return len(c.QOP) == 0 || c.SupportsQOP("auth")
}

// Digest creates credentials from a challenge and request options.
Expand Down

0 comments on commit c4df5d0

Please sign in to comment.