]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use \n as line separator in stead of \r\n, which causes problems in MacPython 2.2.
authorJack Jansen <jack.jansen@cwi.nl>
Thu, 10 Oct 2002 21:13:53 +0000 (21:13 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Thu, 10 Oct 2002 21:13:53 +0000 (21:13 +0000)
Lib/test/output/test_httplib
Lib/test/test_httplib.py

index d9b3fa1b4af6be8e5b065fe294dbaf075f35e4f0..7b1103f29d90669912af79d4f00c03f6d06a33a9 100644 (file)
@@ -1,10 +1,10 @@
 test_httplib
-reply: 'HTTP/1.1 200 Ok\r\n'
+reply: 'HTTP/1.1 200 Ok\n'
 Text
-reply: 'HTTP/1.1 400.100 Not Ok\r\n'
+reply: 'HTTP/1.1 400.100 Not Ok\n'
 BadStatusLine raised as expected
 InvalidURL raised as expected
 InvalidURL raised as expected
-reply: 'HTTP/1.1 200 OK\r\n'
+reply: 'HTTP/1.1 200 OK\n'
 header: Set-Cookie: Customer="WILE_E_COYOTE"; Version="1"; Path="/acme"
 header: Set-Cookie: Part_Number="Rocket_Launcher_0001"; Version="1"; Path="/acme"
index f70abec7ea5400ea552689238d7b2dfeb9451ebd..36d77525bb7ab373b6f273833080b67bd29681b4 100644 (file)
@@ -13,14 +13,14 @@ class FakeSocket:
 
 # Test HTTP status lines
 
-body = "HTTP/1.1 200 Ok\r\n\r\nText"
+body = "HTTP/1.1 200 Ok\n\nText"
 sock = FakeSocket(body)
 resp = httplib.HTTPResponse(sock, 1)
 resp.begin()
 print resp.read()
 resp.close()
 
-body = "HTTP/1.1 400.100 Not Ok\r\n\r\nText"
+body = "HTTP/1.1 400.100 Not Ok\n\nText"
 sock = FakeSocket(body)
 resp = httplib.HTTPResponse(sock, 1)
 try:
@@ -41,12 +41,12 @@ for hp in ("www.python.org:abc", "www.python.org:"):
         print "Expect InvalidURL"
 
 # test response with multiple message headers with the same field name.
-text = ('HTTP/1.1 200 OK\r\n'
-        'Set-Cookie: Customer="WILE_E_COYOTE"; Version="1"; Path="/acme"\r\n'
+text = ('HTTP/1.1 200 OK\n'
+        'Set-Cookie: Customer="WILE_E_COYOTE"; Version="1"; Path="/acme"\n'
         'Set-Cookie: Part_Number="Rocket_Launcher_0001"; Version="1";'
-        ' Path="/acme"\r\n'
-        '\r\n'
-        'No body\r\n')
+        ' Path="/acme"\n'
+        '\n'
+        'No body\n')
 hdr = ('Customer="WILE_E_COYOTE"; Version="1"; Path="/acme"'
        ', '
        'Part_Number="Rocket_Launcher_0001"; Version="1"; Path="/acme"')