mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
warcserver: routing: use werkzeug default rule instead of 'path:' (currently used for single path segments anyway), fixes issues with
werkzeug 0.14, fixes #271
This commit is contained in:
parent
df14c67a56
commit
8b6eb6d5ca
@ -44,10 +44,10 @@ class BaseWarcServer(object):
|
||||
return handler(params)
|
||||
|
||||
self.url_map.add(Rule(path, endpoint=direct_input_request))
|
||||
self.url_map.add(Rule(path + '/<path:mode>', endpoint=direct_input_request))
|
||||
self.url_map.add(Rule(path + '/<mode>', endpoint=direct_input_request))
|
||||
|
||||
self.url_map.add(Rule(path + '/postreq', endpoint=post_fullrequest))
|
||||
self.url_map.add(Rule(path + '/<path:mode>/postreq', endpoint=post_fullrequest))
|
||||
self.url_map.add(Rule(path + '/<mode>/postreq', endpoint=post_fullrequest))
|
||||
|
||||
handler_dict = handler.get_supported_modes()
|
||||
|
||||
|
@ -74,7 +74,7 @@ class WarcServer(BaseWarcServer):
|
||||
self.add_route('/' + name, route)
|
||||
|
||||
if self.auto_handler:
|
||||
self.add_route('/<path:path_param_value>', self.auto_handler, path_param_name='param.coll')
|
||||
self.add_route('/<path_param_value>', self.auto_handler, path_param_name='param.coll')
|
||||
|
||||
def init_paths(self, name, abs_path=None):
|
||||
templ = self.config.get(name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user