I am trying to simulate a protocol error 504 gateway timeout. This is my server code. I would like to return a 504 error in the add() method.
from SimpleXMLRPCServer import SimpleXMLRPCServer
def add(x,y):
return x+y
# A simple server with simple arithmetic functions
server = SimpleXMLRPCServer(("localhost", 8000))
print "Listening on port 8000..."
server.register_multicall_functions()
server.register_function(add, 'add')
server.serve_forever()
Thank you in advance for your time.