Make copy of headers before mutating
This commit is contained in:
parent
f7e995f9f6
commit
20b1480399
@ -265,6 +265,7 @@ class Application:
|
||||
"""Manage a request."""
|
||||
|
||||
def response(status, headers={}, answer=None):
|
||||
headers = headers.copy()
|
||||
# Set content length
|
||||
if answer:
|
||||
self.logger.debug("Response content:\n%s", answer)
|
||||
@ -380,6 +381,7 @@ class Application:
|
||||
self.logger.info("%s refused" % (user or "Anonymous user"))
|
||||
status = client.UNAUTHORIZED
|
||||
realm = self.configuration.get("server", "realm")
|
||||
headers = headers.copy()
|
||||
headers.update ({
|
||||
"WWW-Authenticate":
|
||||
"Basic realm=\"%s\"" % realm})
|
||||
|
Loading…
Reference in New Issue
Block a user