Commit 5662c79a authored by Vincent Pelletier's avatar Vincent Pelletier

wsgi: Prepare routing dict for extension.

parent e1233c9d
......@@ -125,16 +125,28 @@ class Application(object):
}
self._routing_dict = {
'crl': {
'GET': self.getCRL,
'GET': {
'method': self.getCRL,
},
},
'csr': {
'GET': self.getCSR,
'PUT': self.putCSR,
'DELETE': self.deleteCSR,
'GET': {
'method': self.getCSR,
},
'PUT': {
'method': self.putCSR,
},
'DELETE': {
'method': self.deleteCSR,
},
},
'crt': {
'GET': self.getCRT,
'PUT': self.putCRT,
'GET': {
'method': self.getCRT,
},
'PUT': {
'method': self.putCRT,
},
},
}
......@@ -162,10 +174,10 @@ class Application(object):
result = []
else:
try:
method = method_dict[request_method]
entry = method_dict[request_method]
except KeyError:
raise BadMethod
status, header_list, result = method(context, environ, path_item_list[2:])
status, header_list, result = entry['method'](context, environ, path_item_list[2:])
except ApplicationError:
raise
except exceptions.NotFound:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment