summaryrefslogtreecommitdiff
path: root/cherrypy/test/test_http.py
diff options
context:
space:
mode:
authorRobert Brewer <fumanchu@aminus.org>2008-11-08 23:30:21 +0000
committerRobert Brewer <fumanchu@aminus.org>2008-11-08 23:30:21 +0000
commit4cba9acfc2af2ec487d36452060c651c4472a4e9 (patch)
treed7450ac7b684b0b94ec06d9ec5d976cd1b4954f6 /cherrypy/test/test_http.py
parent7d39e1464b57ff28a8e87312079c38e5c71db2ab (diff)
downloadcherrypy-git-cherrypy-3.1.1.tar.gz
Merge from trunk for today's fixes [2072] to [2080].cherrypy-3.1.1
--HG-- branch : cherrypy-3.1.x
Diffstat (limited to 'cherrypy/test/test_http.py')
-rw-r--r--cherrypy/test/test_http.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/cherrypy/test/test_http.py b/cherrypy/test/test_http.py
index 92162bcc..ae7886c7 100644
--- a/cherrypy/test/test_http.py
+++ b/cherrypy/test/test_http.py
@@ -70,9 +70,9 @@ class HTTPTests(helper.CPWebCase):
# will hang. Verify that CP times out the socket and responds
# with 411 Length Required.
if self.scheme == "https":
- c = httplib.HTTPSConnection("127.0.0.1:%s" % self.PORT)
+ c = httplib.HTTPSConnection('%s:%s' % (self.interface(), self.PORT))
else:
- c = httplib.HTTPConnection("127.0.0.1:%s" % self.PORT)
+ c = httplib.HTTPConnection('%s:%s' % (self.interface(), self.PORT))
c.request("POST", "/")
self.assertEqual(c.getresponse().status, 411)
@@ -87,9 +87,9 @@ class HTTPTests(helper.CPWebCase):
# post file
if self.scheme == 'https':
- c = httplib.HTTPS('127.0.0.1:%s' % self.PORT)
+ c = httplib.HTTPS('%s:%s' % (self.interface(), self.PORT))
else:
- c = httplib.HTTP('127.0.0.1:%s' % self.PORT)
+ c = httplib.HTTP('%s:%s' % (self.interface(), self.PORT))
c.putrequest('POST', '/post_multipart')
c.putheader('Content-Type', content_type)
c.putheader('Content-Length', str(len(body)))
@@ -110,9 +110,9 @@ class HTTPTests(helper.CPWebCase):
# Test missing version in Request-Line
if self.scheme == 'https':
- c = httplib.HTTPSConnection('127.0.0.1:%s' % self.PORT)
+ c = httplib.HTTPSConnection('%s:%s' % (self.interface(), self.PORT))
else:
- c = httplib.HTTPConnection('127.0.0.1:%s' % self.PORT)
+ c = httplib.HTTPConnection('%s:%s' % (self.interface(), self.PORT))
c._output('GET /')
c._send_output()
response = c.response_class(c.sock, strict=c.strict, method='GET')