From: Jack Jansen Date: Thu, 10 Oct 2002 21:13:53 +0000 (+0000) Subject: Use \n as line separator in stead of \r\n, which causes problems in MacPython 2.2. X-Git-Tag: v2.2.2~34 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=efe39e59e8d646f382d9e18c6182f245ea41481d;p=thirdparty%2FPython%2Fcpython.git Use \n as line separator in stead of \r\n, which causes problems in MacPython 2.2. --- diff --git a/Lib/test/output/test_httplib b/Lib/test/output/test_httplib index d9b3fa1b4af6..7b1103f29d90 100644 --- a/Lib/test/output/test_httplib +++ b/Lib/test/output/test_httplib @@ -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" diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py index f70abec7ea54..36d77525bb7a 100644 --- a/Lib/test/test_httplib.py +++ b/Lib/test/test_httplib.py @@ -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"')