forked from seba/servefile
Fixed connection keep-alive bug for basic auth
This commit is contained in:
parent
d54b3f5b8d
commit
72b561ace7
|
@ -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…
Reference in New Issue