double quotes in unauthorized exception per rfc7230

This commit is contained in:
Raphael Deem
2017-12-21 17:54:57 -08:00
parent c30e805623
commit 9c02cdbad9
2 changed files with 6 additions and 6 deletions

View File

@@ -263,7 +263,7 @@ class Unauthorized(SanicException):
# if auth-scheme is specified, set "WWW-Authenticate" header
if scheme is not None:
values = ["{!s}={!r}".format(k, v) for k, v in kwargs.items()]
values = ['{!s}="{!s}"'.format(k, v) for k, v in kwargs.items()]
challenge = ', '.join(values)
self.headers = {