httplib status codes constants in response
This commit is contained in:
parent
6c85bdd498
commit
5b07d2de30
|
@ -266,11 +266,11 @@ class BMXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
|
||||||
)
|
)
|
||||||
except Exception: # This should only happen if the module is buggy
|
except Exception: # This should only happen if the module is buggy
|
||||||
# internal error, report as HTTP server error
|
# internal error, report as HTTP server error
|
||||||
self.send_response(500)
|
self.send_response(httplib.INTERNAL_SERVER_ERROR)
|
||||||
self.end_headers()
|
self.end_headers()
|
||||||
else:
|
else:
|
||||||
# got a valid XML RPC response
|
# 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-type", self.server.content_type)
|
||||||
self.send_header("Content-length", str(len(response)))
|
self.send_header("Content-length", str(len(response)))
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user