Skip to content

Make xmlrpc use HTTP/1.1 and keepalive #45274

Closed

Description

@dbaarda
mannequin
BPO 1767370
Nosy @loewis, @smontanaro, @rhettinger, @dbaarda, @kristjanvalur, @vstinner
Files
  • xmlrpc-keepalive.diff.gz: patch against trunk
  • xmlrpc-keepalive.diff: Patch against trunk
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2009-09-14.11:16:01.210>
    created_at = <Date 2007-08-03.23:16:55.000>
    labels = ['type-bug', 'library']
    title = 'Make xmlrpc use HTTP/1.1 and keepalive'
    updated_at = <Date 2009-09-14.11:16:01.209>
    user = 'https://github.com/dbaarda'

    bugs.python.org fields:

    activity = <Date 2009-09-14.11:16:01.209>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-09-14.11:16:01.210>
    closer = 'vstinner'
    components = ['Library (Lib)']
    creation = <Date 2007-08-03.23:16:55.000>
    creator = 'abo'
    dependencies = []
    files = ['8153', '10313']
    hgrepos = []
    issue_num = 1767370
    keywords = ['patch']
    message_count = 15.0
    messages = ['52983', '65689', '65691', '66767', '66771', '66883', '70124', '70135', '70222', '70229', '70239', '72292', '79547', '92598', '92604']
    nosy_count = 11.0
    nosy_names = ['loewis', 'skip.montanaro', 'rhettinger', 'abo', 'kristjan.jonsson', 'vstinner', 'marhar', 'schmir', 'Reflejo', 'jonozzz', 'williambr']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue1767370'
    versions = ['Python 2.5']

    Activity

    1. dbaarda commented on Aug 3, 2007

      dbaardamannequin
      MannequinAuthor

      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.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      on Aug 3, 2007
    3. smontanaro commented on Apr 22, 2008

      @smontanaro
      Contributor

      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

    4. rhettinger commented on Apr 22, 2008

      @rhettinger
      Contributor

      Also, please post the patch in uncompressed form.

    5. Reflejo commented on May 13, 2008

      Reflejomannequin
      Mannequin

      I made this patch works against trunk, also i'v fixed some typos.

    6. smontanaro commented on May 13, 2008

      @smontanaro
      Contributor

      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.

    7. dbaarda commented on May 15, 2008

      dbaardamannequin
      MannequinAuthor

      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 <[email protected]> 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 <[email protected]>
      <http://bugs.python.org/issue1767370\>


    8. marhar commented on Jul 21, 2008

      marharmannequin
      Mannequin

      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.

    9. loewis commented on Jul 22, 2008

      loewismannequin
      Mannequin

      We would need the copyright holder of the patch to submit a contributor
      form. Would that be possible?

    10. dbaarda commented on Jul 24, 2008

      dbaardamannequin
      MannequinAuthor

      On Tue, July 22, 2008 05:21, Martin v. Löwis wrote:

      Martin v. Löwis <[email protected]> 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 ([email protected]), and so do I ([email protected])... 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 <[email protected]>
      <http://bugs.python.org/issue1767370\>


    11. Reflejo commented on Jul 24, 2008

      Reflejomannequin
      Mannequin

      I've signed and faxed the form. Just in case.

      Martin.

    12. loewis commented on Jul 25, 2008

      loewismannequin
      Mannequin

      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).

    13. jonozzz commented on Sep 1, 2008

      jonozzzmannequin
      Mannequin

      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

    14. added
      type-bugAn unexpected behavior, bug, or error
      on Sep 1, 2008
    15. williambr commented on Jan 10, 2009

      williambrmannequin
      Mannequin

      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...

    16. vstinner commented on Sep 14, 2009

      @vstinner
      Member

      I think that this issue is a duplicate of bpo-6267 which is already commited to
      Python trunk. bpo-6267 is a superset of bpo-6099.

      See also bpo-2076 (another duplicate of bpo-6267 ?).

    17. kristjanvalur commented on Sep 14, 2009

      kristjanvalurmannequin
      Mannequin

      Yes, it is indeed a duplicate.

    18. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions