From ff5ba92f4e8ddee2031e49b21f6f970a997568ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Cuenca=20Abela?= Date: Thu, 23 Jun 2011 07:40:34 -0700 Subject: [PATCH 1/2] Support query arguments in the URL --- superlance/httpok.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/superlance/httpok.py b/superlance/httpok.py index 547010c..71958c9 100644 --- a/superlance/httpok.py +++ b/superlance/httpok.py @@ -140,8 +140,7 @@ def runforever(self, test=False): scheme = parsed[0].lower() hostport = parsed[1] path = parsed[2] - params = parsed[3] - query = parsed[4] + query = parsed[3] if self.connclass: ConnClass = self.connclass From becd18a3e4ecff7d037a4c1fae0c3340b00e803c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Cuenca=20Abela?= Date: Thu, 23 Jun 2011 07:48:15 -0700 Subject: [PATCH 2/2] Don't change the path at every loop cycle. --- superlance/httpok.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/superlance/httpok.py b/superlance/httpok.py index 71958c9..18a0d0a 100644 --- a/superlance/httpok.py +++ b/superlance/httpok.py @@ -142,6 +142,9 @@ def runforever(self, test=False): path = parsed[2] query = parsed[3] + if query: + path += '?' + query + if self.connclass: ConnClass = self.connclass elif scheme == 'http': @@ -166,9 +169,6 @@ def runforever(self, test=False): conn = ConnClass(hostport) conn.timeout = self.timeout - if query: - path += '?' + query - act = False specs = self.listProcesses(ProcessStates.RUNNING)