From 9c5ea50c25aa0426069d69b3ad5de208d45762dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 1 May 2003 05:05:09 +0000 Subject: [PATCH] Patch #727805: Remove extra line ending from CGI responses. --- Lib/DocXMLRPCServer.py | 3 ++- Lib/SimpleXMLRPCServer.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Lib/DocXMLRPCServer.py b/Lib/DocXMLRPCServer.py index 55ec38ed5dd..b900c5fc5de 100644 --- a/Lib/DocXMLRPCServer.py +++ b/Lib/DocXMLRPCServer.py @@ -14,6 +14,7 @@ import inspect import types import re +import sys from SimpleXMLRPCServer import SimpleXMLRPCServer,\ SimpleXMLRPCRequestHandler,\ @@ -269,7 +270,7 @@ def handle_get(self): 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 54533bf0e60..fd8be18e8b3 100644 --- a/Lib/SimpleXMLRPCServer.py +++ b/Lib/SimpleXMLRPCServer.py @@ -462,7 +462,7 @@ def handle_xmlrpc(self, request_text): 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 @@ def handle_get(self): 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.