]> granicus.if.org Git - python/commitdiff
Patch #727805: Remove extra line ending from CGI responses.
authorMartin v. Löwis <martin@v.loewis.de>
Thu, 1 May 2003 05:05:09 +0000 (05:05 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Thu, 1 May 2003 05:05:09 +0000 (05:05 +0000)
Lib/DocXMLRPCServer.py
Lib/SimpleXMLRPCServer.py

index 55ec38ed5dd408aade23f5a664e8ce6480c6b692..b900c5fc5ded5f1b510ae4cae4b610c8970e0f60 100644 (file)
@@ -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)
index 54533bf0e6097dc40394d25be814b4de49c9510a..fd8be18e8b3da60749460166861e5e9d54d3ead5 100644 (file)
@@ -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.