Browse Source

Fixed connection keep-alive bug for basic auth

tests
Sebastian Lohff 10 years ago
parent
commit
72b561ace7
  1. 5
      servefile

5
servefile

@ -976,6 +976,11 @@ class AuthenticationHandler(): @@ -976,6 +976,11 @@ class AuthenticationHandler():
else:
self.send_response(401)
self.send_header("WWW-Authenticate", "Basic realm=\"%s\"" % self.realm)
self.send_header("Connection", "close")
errorMsg = "<html><head><title>401 - Unauthorized</title></head><body><h1>401 - Unauthorized</h1></body></html>"
self.send_header("Content-Length", str(len(errorMsg)))
self.end_headers()
self.wfile.write(errorMsg)
def main():

Loading…
Cancel
Save