Make endpoint handle all http methods
Project: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/commit/733ed1b7 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/tree/733ed1b7 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/diff/733ed1b7 Branch: refs/heads/master Commit: 733ed1b7a3c23033530211d63073d9fcffe59599 Parents: f4d146d Author: Thomas Jackson <[email protected]> Authored: Fri Jan 9 14:53:47 2015 -0800 Committer: Thomas Jackson <[email protected]> Committed: Fri Jan 9 14:53:47 2015 -0800 ---------------------------------------------------------------------- tsqa/endpoint.py | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver-qa/blob/733ed1b7/tsqa/endpoint.py ---------------------------------------------------------------------- diff --git a/tsqa/endpoint.py b/tsqa/endpoint.py index c0a1e31..9f9bc9b 100644 --- a/tsqa/endpoint.py +++ b/tsqa/endpoint.py @@ -98,6 +98,11 @@ class DynamicHTTPEndpoint(threading.Thread): # return a 404 since we didn't find it return ('', 404) + # A little magic to make flask accept *all* methods on the catch_all path + for rule in self.app.url_map.iter_rules('hello'): + rule.methods = None + rule.refresh() + def get_tracking_key(self): ''' Return a new key for tracking a request by key
