You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2015/01/28 05:37:09 UTC
[31/50] trafficserver-qa git commit: Make endpoint handle all http
methods
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 <ja...@gmail.com>
Authored: Fri Jan 9 14:53:47 2015 -0800
Committer: Thomas Jackson <ja...@gmail.com>
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