Permalink
Browse files

Changes an internal parameter. 'is_ssl' is not a class property.

  • Loading branch information...
1 parent d23b903 commit d3e739e10b430348f5a5404dde63c32fd16a5a5e @alobbs alobbs committed Nov 20, 2011
Showing with 14 additions and 12 deletions.
  1. +1 −1 qa/091-Digest2.py
  2. +1 −1 qa/092-Digest3.py
  3. +1 −1 qa/100-Digest-htdigest.py
  4. +1 −1 qa/130-Digest-EmptyPasswd.py
  5. +1 −1 qa/175-Digest-htdigest-2.py
  6. +7 −6 qa/base.py
  7. +2 −1 qa/run-tests.py
View
@@ -29,7 +29,7 @@ def JustBefore (self, www):
#
nested = TestBase(__file__)
nested.request = "GET /digest2/file HTTP/1.0\r\n"
- nested.Run(HOST, PORT, 0)
+ nested.Run(HOST, PORT)
# Parse the authentication information line
#
View
@@ -30,7 +30,7 @@ def JustBefore (self, www):
#
nested = TestBase(__file__)
nested.request = "GET /digest3/file HTTP/1.0\r\n"
- nested.Run(HOST, PORT, 0)
+ nested.Run(HOST, PORT)
# Parse the authentication information line
#
@@ -30,7 +30,7 @@ def JustBefore (self, www):
#
nested = TestBase(__file__)
nested.request = "GET /%s/file HTTP/1.0\r\n" % (DIR)
- nested.Run(HOST, PORT, 0)
+ nested.Run(HOST, PORT)
# Parse the authentication information line
#
@@ -29,7 +29,7 @@ def JustBefore (self, www):
#
nested = TestBase(__file__)
nested.request = "GET /digest_empty/file HTTP/1.0\r\n"
- nested.Run(HOST, PORT, 0)
+ nested.Run(HOST, PORT)
# Parse the authentication information line
#
@@ -38,7 +38,7 @@ def JustBefore (self, www):
#
nested = TestBase(__file__)
nested.request = "GET /%s/file HTTP/1.0\r\n" % (DIR)
- nested.Run(HOST, PORT, 0)
+ nested.Run(HOST, PORT)
# Parse the authentication information line
#
View
@@ -49,6 +49,7 @@ def __init__ (self, file):
def _initialize (self):
self.ssl = None
+ self.is_ssl = False
self.reply = "" # "200 OK"..
self.version = None # HTTP/x.y: 9, 0 or 1
self.reply_err = None # 200
@@ -67,7 +68,7 @@ def _safe_read (self, s):
continue
raise
- def _do_request (self, host, port, ssl):
+ def _do_request (self, host, port):
for res in socket.getaddrinfo (host, port, socket.AF_UNSPEC, socket.SOCK_STREAM):
af, socktype, proto, canonname, sa = res
@@ -87,7 +88,7 @@ def _do_request (self, host, port, ssl):
if s is None:
raise Exception("Couldn't connect to the server")
- if ssl:
+ if self.is_ssl:
try:
self.ssl = socket.ssl (s)
except:
@@ -214,8 +215,8 @@ def JustAfter (self, www):
def CustomTest (self):
return 0
- def Run (self, host, port, ssl):
- self._do_request(host, port, ssl)
+ def Run (self, host, port):
+ self._do_request(host, port)
self._parse_output()
return self._check_result()
@@ -448,10 +449,10 @@ def JustAfter (self, www):
self.current_test = current
- def Run (self, host, port, ssl):
+ def Run (self, host, port):
for t in self.tests:
self.current_test = t
- r = t.Run(host, port, ssl)
+ r = t.Run(host, port)
if r == -1: return r
if self.delay > 0:
View
@@ -296,6 +296,7 @@
obj.tmp = tmp
obj.nobody = nobody
obj.php_conf = php_ext
+ obj.is_ssl = ssl
objs.append(obj)
# Prepare www files
@@ -467,7 +468,7 @@ def mainloop_iterator (objs, main_thread=True):
try:
obj.JustBefore(www)
- ret = obj.Run (client_host, client_port, ssl)
+ ret = obj.Run (client_host, client_port)
obj.JustAfter(www)
except Exception, e:
if not its_clean:

0 comments on commit d3e739e

Please sign in to comment.