diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2003-05-01 05:05:09 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2003-05-01 05:05:09 (GMT) |
commit | 9c5ea50c25aa0426069d69b3ad5de208d45762dc (patch) | |
tree | 6376b957b6723dc48594d300fbc6d257441ad47d /Lib | |
parent | 16ec34eefb57278e9dab483f87be153886bcfe8b (diff) | |
download | cpython-9c5ea50c25aa0426069d69b3ad5de208d45762dc.zip cpython-9c5ea50c25aa0426069d69b3ad5de208d45762dc.tar.gz cpython-9c5ea50c25aa0426069d69b3ad5de208d45762dc.tar.bz2 |
Patch #727805: Remove extra line ending from CGI responses.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/DocXMLRPCServer.py | 3 | ||||
-rw-r--r-- | Lib/SimpleXMLRPCServer.py | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Lib/DocXMLRPCServer.py b/Lib/DocXMLRPCServer.py index 55ec38e..b900c5f 100644 --- a/Lib/DocXMLRPCServer.py +++ b/Lib/DocXMLRPCServer.py @@ -14,6 +14,7 @@ import pydoc import inspect import types import re +import sys from SimpleXMLRPCServer import SimpleXMLRPCServer,\ SimpleXMLRPCRequestHandler,\ @@ -269,7 +270,7 @@ class DocCGIXMLRPCRequestHandler( CGIXMLRPCRequestHandler, print 'Content-Type: text/html' print 'Content-Length: %d' % len(response) print - print response + sys.stdout.write(response) def __init__(self): CGIXMLRPCRequestHandler.__init__(self) diff --git a/Lib/SimpleXMLRPCServer.py b/Lib/SimpleXMLRPCServer.py index 54533bf..fd8be18 100644 --- a/Lib/SimpleXMLRPCServer.py +++ b/Lib/SimpleXMLRPCServer.py @@ -462,7 +462,7 @@ class CGIXMLRPCRequestHandler(SimpleXMLRPCDispatcher): print 'Content-Type: text/xml' print 'Content-Length: %d' % len(response) print - print response + sys.stdout.write(response) def handle_get(self): """Handle a single HTTP GET request. @@ -485,7 +485,7 @@ class CGIXMLRPCRequestHandler(SimpleXMLRPCDispatcher): print 'Content-Type: text/html' print 'Content-Length: %d' % len(response) print - print response + sys.stdout.write(reponse) def handle_request(self, request_text = None): """Handle a single XML-RPC request passed through a CGI post method. |