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.
Created on 2006年12月11日 23:17 by mattgbrown, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue1613573_xmlrpc_uses_deprecated_api.patch | techtonik, 2008年07月01日 13:30 | patch against trunk | ||
| Messages (12) | |||
|---|---|---|---|
| msg30788 - (view) | Author: Matt Brown (mattgbrown) | Date: 2006年12月11日 23:17 | |
The ServerProxy class of the xmlrpclib module uses the old style HTTP / HTTPS classes of the httplib module rather than the newer HTTPConnection and HTTPConnection classes. The practical result of this is that xmlrpc connections are not able to make use of HTTP/1.1 functionality. Please update the xmlrpclib module to use the newer API provided by httplib so that the advanced functionality of HTTP/1.1 is available. |
|||
| msg30789 - (view) | Author: A.M. Kuchling (akuchling) * (Python committer) | Date: 2006年12月12日 20:58 | |
Can you provide a patch to make this change? |
|||
| msg30790 - (view) | Author: Itkovian (itkovian) | Date: 2007年06月15日 14:05 | |
I think the only changes required are these: --- /sw/lib/python2.5/xmlrpclib.py 2006年11月29日 02:46:38.000000000 +0100 +++ xmlrpclib.py 2007年06月15日 16:03:17.000000000 +0200 @@ -1182,23 +1182,13 @@ self.send_user_agent(h) self.send_content(h, request_body) - errcode, errmsg, headers = h.getreply() + response = h.getresponse() + + if response.status != 200: + raise ProtocolError(host + handler, response.status, response.reason, response.msg.headers) - if errcode != 200: - raise ProtocolError( - host + handler, - errcode, errmsg, - headers - ) - - self.verbose = verbose - - try: - sock = h._conn.sock - except AttributeError: - sock = None - - return self._parse_response(h.getfile(), sock) + payload = response.read() + return payload ## # Create parser. @@ -1250,7 +1240,7 @@ # create a HTTP connection object from a host descriptor import httplib host, extra_headers, x509 = self.get_host_info(host) - return httplib.HTTP(host) + return httplib.HTTPConnection(host) |
|||
| msg64329 - (view) | Author: Guilherme Polo (gpolo) * (Python committer) | Date: 2008年03月22日 15:02 | |
There is another patch regarding the use of HTTP/1.1 for xmlrpclib at http://bugs.python.org/issue1767370. The other issue could be update with some comments from this issue and then this issue could be closed, I believe. |
|||
| msg69043 - (view) | Author: anatoly techtonik (techtonik) | Date: 2008年07月01日 13:30 | |
* use newer 2.0 public interface of httplib for connection handling Attached patch is for trunk/ Tested for Python 2.5 issue1767370 is a separate issue that can be fixed later |
|||
| msg92601 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2009年09月14日 10:48 | |
I consider this issue as a duplicate of #6267 which is already fixed (commited). Reopen the issue if I'm wrong ;-) See also #2076 and #1767370 (other duplicates). |
|||
| msg92689 - (view) | Author: anatoly techtonik (techtonik) | Date: 2009年09月16日 15:33 | |
Yep, the patch at #6267 is an extension of this one except for the last chunk where I also check if sockets are ssl-enabled. I am not sure why it was needed. It also may have been already fixed somewhere else. As this bug doesn't have any tests attached it may be considered closed for now. Would be nice to see these fixes in Python 2.6 though as it is the default version that seems to go in Ubuntu 9.10 + import socket + if not socket._have_ssl: raise NotImplementedError( "your version of httplib doesn't support HTTPS" ) |
|||
| msg92695 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2009年09月16日 16:02 | |
@techtonik: I don't think that testing socket._have_ssl is better than testing for HTTPSConnection. socket._have_ssl might be True, whereas HTTPSConnection is missing for a random reason. xmlrpclib uses HTTPSConnection, not directly the socket library. HTTPSConnection may be implemented using something else than socket / ssl. |
|||
| msg92698 - (view) | Author: anatoly techtonik (techtonik) | Date: 2009年09月16日 16:24 | |
There should be a better way to do this check, because HTTPConnection method may exists, but HTTPConnection may be impossible, because of other reasons. And I still would like to see this fix in Python 2.6 - too bad it hadn't enough attention before 2.6. Flags like +wanted-2.6 like in FireFox bugzilla could really help to see/discuss critical parts to be included for everybody before it's too late. Should we stop development and dedicate a month or two on improving the process? =) |
|||
| msg92702 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2009年09月16日 17:13 | |
@techtonik: You wrote "HTTPConnection" twice. I don't really understand your request. Do you think that the issue is fixed in Python trunk or not? If not, please open a new issue since this issue is closed. techtonik> And I still would like to see this fix in Python 2.6 techtonik> - too bad it hadn't enough attention before 2.6. Python is developed by people working on Python in their free time. IMHO, voting for an ticket is useless. If you want to see your fix faster in the subversion, follow some rules: - explain correctly the issue - write a test - write a patch - explain your solution - fix your patches if needed after each patch review You posted your patch the 1st July 2008, and the 2.6 final version was released the 1st october 2008. It was a little bit too late for the 2.6 (because of the beta/RC releases), but it may be included in next 2.6.x release if it's easy to backport it. I also think that not enough people are interested by XML-RPC + HTTPS. |
|||
| msg92748 - (view) | Author: anatoly techtonik (techtonik) | Date: 2009年09月17日 09:17 | |
This bug may be fixed. Unfortunately I do not possess original setup anymore. The primary issue is still issue648658 and that affects bzr + launchpad integration, XML-RPC access to bugzilla and probably more. |
|||
| msg92749 - (view) | Author: anatoly techtonik (techtonik) | Date: 2009年09月17日 09:20 | |
And I want to add that I am glad that is finally fixed, so I really appreciate the work people done in this direction in their free time. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:21 | admin | set | github: 44330 |
| 2009年09月17日 09:20:04 | techtonik | set | messages: + msg92749 |
| 2009年09月17日 09:17:54 | techtonik | set | messages: + msg92748 |
| 2009年09月16日 17:13:01 | vstinner | set | messages: + msg92702 |
| 2009年09月16日 17:10:25 | vstinner | set | messages: - msg92701 |
| 2009年09月16日 17:09:58 | vstinner | set | messages: + msg92701 |
| 2009年09月16日 16:24:12 | techtonik | set | messages: + msg92698 |
| 2009年09月16日 16:02:12 | vstinner | set | messages: + msg92695 |
| 2009年09月16日 15:33:37 | techtonik | set | messages: + msg92689 |
| 2009年09月14日 10:49:01 | vstinner | set | status: open -> closed resolution: duplicate |
| 2009年09月14日 10:48:20 | vstinner | set | nosy:
+ vstinner messages: + msg92601 |
| 2008年07月01日 13:30:44 | techtonik | set | files:
+ issue1613573_xmlrpc_uses_deprecated_api.patch keywords: + patch messages: + msg69043 nosy: + techtonik versions: + Python 2.6 |
| 2008年03月22日 15:02:53 | gpolo | set | nosy:
+ gpolo messages: + msg64329 |
| 2006年12月11日 23:17:38 | mattgbrown | create | |