xmlrpc, httplib and SSL

Skip Montanaro skip at pobox.com
Sun Mar 28 20:26:25 EST 2004


>>>>> "Skip" == Skip Montanaro <skip at pobox.com> writes:

    Roger> I did, except the base implementation can't be called.  It hs
    Roger> this line of code in it:

    Roger> self.connection.shutdown(1)

    Roger> ie it will close the connection after every response, no matter
    Roger> what.

    Skip> Can you submit a patch to SF which abstracts that into its own
    Skip> method ("end_request" or something similar?) which can be
    Skip> overridden.

Does this (untested) change help?  You should be able to override the
finish() method in a subclass.

Skip

% cvs diff SimpleXMLRPCServer.py 
Index: SimpleXMLRPCServer.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/SimpleXMLRPCServer.py,v
retrieving revision 1.8
diff -c -r1.8 SimpleXMLRPCServer.py
*** SimpleXMLRPCServer.py       2 Nov 2003 09:47:05 -0000       1.8
--- SimpleXMLRPCServer.py       28 Mar 2004 23:56:38 -0000
***************
*** 422,428 ****
  
              # shut down the connection
              self.wfile.flush()
!             self.connection.shutdown(1)
  
      def log_request(self, code='-', size='-'):
          """Selectively log an accepted request."""
--- 422,431 ----
  
              # shut down the connection
              self.wfile.flush()
!             self.finish()
! 
!     def finish(self):
!         self.connection.shutdown(1)
  
      def log_request(self, code='-', size='-'):
          """Selectively log an accepted request."""




More information about the Python-list mailing list