diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2002-11-13 17:30:32 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2002-11-13 17:30:32 (GMT) |
commit | 77628658ca71260d2a69bbb7f35f3f6e5df796be (patch) | |
tree | ea09470635fc0ed88b4e7da40e37bfd1dfacce8c /Lib/httplib.py | |
parent | 22b3a49d3c17c37348e65d06df8683e5b8fc6fd0 (diff) | |
download | cpython-77628658ca71260d2a69bbb7f35f3f6e5df796be.zip cpython-77628658ca71260d2a69bbb7f35f3f6e5df796be.tar.gz cpython-77628658ca71260d2a69bbb7f35f3f6e5df796be.tar.bz2 |
Remove some test code.
The buggy yahoo server was fixed, and the opalgroup test files are
gone.
Diffstat (limited to 'Lib/httplib.py')
-rw-r--r-- | Lib/httplib.py | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py index 0dbd6e4..d367ea7 100644 --- a/Lib/httplib.py +++ b/Lib/httplib.py @@ -1224,8 +1224,6 @@ def test(): if hasattr(socket, 'ssl'): for host, selector in (('sourceforge.net', '/projects/python'), - ('dbserv2.theopalgroup.com', '/mediumfile'), - ('dbserv2.theopalgroup.com', '/smallfile'), ): print "https://%s%s" % (host, selector) hs = HTTPS() @@ -1242,36 +1240,5 @@ def test(): for header in headers.headers: print header.strip() print - # Test a buggy server -- returns garbled status line. - # http://www.yahoo.com/promotions/mom_com97/supermom.html - c = HTTPConnection("promotions.yahoo.com") - c.set_debuglevel(1) - c.connect() - c.request("GET", "/promotions/mom_com97/supermom.html") - r = c.getresponse() - print r.status, r.version - lines = r.read().split("\n") - print "\n".join(lines[:5]) - - c = HTTPConnection("promotions.yahoo.com", strict=1) - c.set_debuglevel(1) - c.connect() - c.request("GET", "/promotions/mom_com97/supermom.html") - try: - r = c.getresponse() - except BadStatusLine, err: - print "strict mode failed as expected" - print err - else: - print "XXX strict mode should have failed" - - for strict in 0, 1: - h = HTTP(strict=strict) - h.connect("promotions.yahoo.com") - h.putrequest('GET', "/promotions/mom_com97/supermom.html") - h.endheaders() - status, reason, headers = h.getreply() - assert (strict and status == -1) or status == 200, (strict, status) - if __name__ == '__main__': test() |