httplib status codes constants in response

This commit is contained in:
Dmitri Bogomolov 2019-05-03 16:34:54 +03:00
parent 6c85bdd498
commit 5b07d2de30
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
1 changed files with 2 additions and 2 deletions

View File

@ -266,11 +266,11 @@ class BMXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
)
except Exception: # This should only happen if the module is buggy
# internal error, report as HTTP server error
self.send_response(500)
self.send_response(httplib.INTERNAL_SERVER_ERROR)
self.end_headers()
else:
# got a valid XML RPC response
self.send_response(200)
self.send_response(httplib.OK)
self.send_header("Content-type", self.server.content_type)
self.send_header("Content-length", str(len(response)))