This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Make xmlrpc use HTTP/1.1 and keepalive
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: Reflejo, abo, jonozzz, kristjan.jonsson, loewis, marhar, rhettinger, schmir, skip.montanaro, vstinner, williambr
Priority: normal Keywords: patch

Created on 2007-08-03 23:16 by abo, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
xmlrpc-keepalive.diff.gz abo, 2007-08-03 23:16 patch against trunk
xmlrpc-keepalive.diff Reflejo, 2008-05-13 03:04 Patch against trunk
Messages (15)
msg52983 - (view) Author: Donovan Baarda (abo) * Date: 2007-08-03 23:16
This patch is being submitted by me on behalf of someone else who wrote it. The patch as provided to me was against python2.5. I have applied and regenerated this patch against the current svn trunk. I have not tested it, but the author is using it and reports that it is working well.

As the summary indicates, it makes xmlrpc use HTTP/1.1 keepalive with, which makes it much more efficient. I believe it also ads improved buffering.
msg65689 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2008-04-22 22:32
Donovan, can you recreate this patch using the current Subversion trunk?
 The patch program complains:

    **** malformed patch at line 125: Index:
trunk.2/Lib/SimpleXMLRPCServer.py

Thanks,

Skip
msg65691 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2008-04-22 22:37
Also, please post the patch in uncompressed form.
msg66767 - (view) Author: Martín Conte Mac Donell (Reflejo) Date: 2008-05-13 03:04
I made this patch works against trunk, also i'v fixed some typos.
msg66771 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2008-05-13 05:37
I'm not going to pretend I understand the changes.  I do notice
that test_docxmlrpc hangs hard on my Mac (doesn't even respond to
Ctl-C).  DocXMLRPCServer subclasses from SimpleXMLRPCServer, so I
suspect it needs some attention.  I tried the obvious replacement
of self.wfile.* with the analogs from SimpleXMLRPCServer but that
didn't help.  Also, the API for the xmlrpclib.Transport class's
send_request method changed and parse_response disappeared completely
even though the docstring for the Transport class explicitly mentions
subclassing it.
msg66883 - (view) Author: Donovan Baarda (abo) * Date: 2008-05-15 21:51
One more time... this time after adding correct email addresses to my 
existing account...

Martín Conte Mac Donell wrote:
> Martín Conte Mac Donell <Reflejo@gmail.com> added the comment:
> 
> I made this patch works against trunk, also i'v fixed some typos.

Sorry for not responding to this earlier...

I didn't write this patch, but submitted it on behalf of the original
author (Cc'ed on this email). I spoke to him about getting this patch
updated, and he said that he has made some more improvements and fixes
since I submitted it.

I will try to get him to produce a new patch, but he (and I) are both
very busy on other things, so I suspect you guys will be able to polish
  up what is already there before we manage to pull something together...

I will give him another poke tomorrow...

> ----------
> nosy: +Reflejo
> versions: +Python 2.5
> Added file: http://bugs.python.org/file10313/xmlrpc-keepalive.diff
> 
> _____________________________________
> Tracker <report@bugs.python.org>
> <http://bugs.python.org/issue1767370>
> _____________________________________
msg70124 - (view) Author: Mark Harrison (marhar) Date: 2008-07-21 22:28
There's a one-line change necessary in BaseHTTPServer.py.
s/socketserver/SocketServer/ on this line:

+        socketserver.StreamRequestHandler.__init__(self, request,
client_address, parent)

+        SocketServer.StreamRequestHandler.__init__(self, request,
client_address, parent)

Other than that it seems to work well.  The client side xmlrpc
code even does the right thing with an apache-based server.

I copied just the patched files to a standalone directory and
it works for Python 2.4 as well, if sys.path picks up that
directory first.
msg70135 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008-07-22 04:21
We would need the copyright holder of the patch to submit a contributor
form. Would that be possible?
msg70222 - (view) Author: Donovan Baarda (abo) * Date: 2008-07-24 19:46
On Tue, July 22, 2008 05:21, Martin v. Löwis wrote:
>
> Martin v. Löwis <martin@v.loewis.de> added the comment:
>
> We would need the copyright holder of the patch to submit a contributor
> form. Would that be possible?

he works for Google (krabbe@google.com), and so do I (abo@google.com)... I
think Google has some sort of company wide contributor agreement, and I
faintly recall signing something before I started working at Google...

krabbe also has a more recent version of this patch that we both keep
failing to submit..

Please let me know if he still needs to sign something, and I'll try to
get him to submit his most recent version of this...

> ----------
> nosy: +loewis
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue1767370>
> _______________________________________
>
msg70229 - (view) Author: Martín Conte Mac Donell (Reflejo) Date: 2008-07-24 21:55
I've signed and faxed the form. Just in case.

Martin.
msg70239 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008-07-25 02:51
If this is under the Google agreement, then it's fine (I think). It's
just that we can't accept anonymous contributions (even if made through
a known middleman).
msg72292 - (view) Author: Ionut Turturica (jonozzz) Date: 2008-09-01 20:26
Note that win32 Python's socket module doesn't have a MSG_DONTWAIT
constant defined. So the following code will fail on windows machines.

+                self.__connection.sock.recv(1,
+                                            socket.MSG_PEEK | 
+                                            socket.MSG_DONTWAIT)

Good job with this patch. It would've been interesting to have a flag to
switch to old http1.0 and see the differences in terms of performance.

Ionut
msg79547 - (view) Author: (williambr) Date: 2009-01-10 15:40
Hi.

I am very intereasted about this patch... specially about the keep-alive
part...
I have a proposition... wouldn't be fair enough to have a separated
Transport just for keep-alive connections?

I could wirte one if no one is against it...
msg92598 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2009-09-14 10:41
I think that this issue is a duplicate of #6267 which is already commited to
Python trunk. #6267 is a superset of #6099.

See also #2076 (another duplicate of #6267 ?).
msg92604 - (view) Author: Kristján Valur Jónsson (kristjan.jonsson) * (Python committer) Date: 2009-09-14 11:12
Yes, it is indeed a duplicate.
History
Date User Action Args
2022-04-11 14:56:25adminsetgithub: 45274
2009-09-14 11:16:01vstinnersetstatus: open -> closed
2009-09-14 11:12:31kristjan.jonssonsetresolution: duplicate

messages: + msg92604
nosy: + kristjan.jonsson
2009-09-14 10:41:48vstinnersetnosy: + vstinner
messages: + msg92598
2009-01-10 15:40:12williambrsetnosy: + williambr
messages: + msg79547
2008-09-01 20:26:48jonozzzsetnosy: + jonozzz
type: behavior
messages: + msg72292
2008-07-25 02:51:46loewissetmessages: + msg70239
2008-07-24 21:55:50Reflejosetmessages: + msg70229
2008-07-24 19:46:32abosetmessages: + msg70222
2008-07-22 04:21:34loewissetnosy: + loewis
messages: + msg70135
2008-07-21 22:28:55marharsetnosy: + marhar
messages: + msg70124
2008-05-15 21:51:20abosetmessages: + msg66883
2008-05-13 05:37:20skip.montanarosetnosy: skip.montanaro, rhettinger, abo, schmir, Reflejo
messages: + msg66771
2008-05-13 03:05:13Reflejosetfiles: + xmlrpc-keepalive.diff
nosy: + Reflejo
messages: + msg66767
versions: + Python 2.5
2008-04-23 17:55:14schmirsetnosy: + schmir
2008-04-22 22:37:11rhettingersetnosy: + rhettinger
messages: + msg65691
2008-04-22 22:32:28skip.montanarosetnosy: + skip.montanaro
messages: + msg65689
2007-08-03 23:16:55abocreate