trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject [31/50] trafficserver-qa git commit: Make endpoint handle all http methods
Date Wed, 28 Jan 2015 04:37:09 GMT
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 <jacksontj.89@gmail.com>
Authored: Fri Jan 9 14:53:47 2015 -0800
Committer: Thomas Jackson <jacksontj.89@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


Mime
View raw message