homepage

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: please add wsgi to SimpleXMLRPCServer
Type: enhancement Stage: patch review
Components: Library (Lib) Versions: Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Sanjeev, berker.peksag, effbot, georg.brandl, gnarfk, loewis, r.david.murray, schmir
Priority: normal Keywords: patch

Created on 2007年06月30日 13:31 by gnarfk, last changed 2022年04月11日 14:56 by admin.

Files
File name Uploaded Description Edit
wsgi_xml_rpc.patch Sanjeev, 2013年03月18日 23:06 review
wsgi_xml_rpc_pep8.patch r.david.murray, 2013年06月25日 17:48 review
issue1745722.diff berker.peksag, 2015年01月25日 22:35 review
Messages (5)
msg55146 - (view) Author: Helmut Grohne (gnarfk) Date: 2007年06月30日 13:31
There should be a simple wsgi xmlrpc application and in fact it is not difficult. You could for instance take this one and append it to SimpleXMLRPCServer.py.
class WSGIXMLRPCRequestHandler(SimpleXMLRPCDispatcher):
 def __init__(self, allow_none=False, encoding=None):
 SimpleXMLRPCDispatcher.__init__(self, allow_none, encoding)
 def __call__(self, environ, start_response):
 """WSGI interface"""
 if environ["REQUEST_METHOD"] != "POST":
 status = "400 Bad request"
 headers = [("Content-type", "text/html")]
 data = "<html><head><title>400 Bad request</title></head><body><h1>400 Bad request</h1></body></html>"
 headers.append(("Content-length", str(len(data))))
 start_response(status, headers)
 if environ["REQUEST_METHOD"] == "HEAD":
 return []
 return [data]
 l = int(environ["CONTENT_LENGTH"])
 request = environ["wsgi.input"].read(l)
 response = self._marshaled_dispatch(request)
 headers = [("Content-type", "text/xml")]
 headers.append(("Content-length", str(len(response))))
 start_response("200 OK", headers)
 return [response]
msg55147 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007年06月30日 14:59
Assigned to Fredrik.
msg55814 - (view) Author: Fredrik Lundh (effbot) * (Python committer) Date: 2007年09月11日 06:20
A proper patch, including tests (if possible) and documentation, would
be nice.
(also note that SimpleXMLRPCServer was written by Brian Quinlan.)
msg191871 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013年06月25日 17:48
I've had a pep8-ification of this patch sitting on my disk for a while. Uploading it here so it doesn't get lost. It feels like there is a lot of redundancy now in the docs. But, it also seems to make sense to provide a wsgi version of this. So I'm inclined to commit it, but would appreciate second opinions.
msg234701 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2015年01月25日 22:35
I've updated the patch for 3.5. I also have cleaned-up the documentation to avoid duplicate content.
History
Date User Action Args
2022年04月11日 14:56:25adminsetgithub: 45142
2015年01月25日 22:35:53berker.peksagsetfiles: + issue1745722.diff
versions: + Python 3.5, - Python 3.4
nosy: + berker.peksag

messages: + msg234701

components: + Library (Lib), - XML
2013年06月25日 17:48:13r.david.murraysetfiles: + wsgi_xml_rpc_pep8.patch
nosy: + r.david.murray
messages: + msg191871

2013年03月19日 08:13:35pitrousetnosy: + loewis

stage: patch review
2013年03月18日 23:06:47Sanjeevsetversions: + Python 3.4, - Python 3.2
2013年03月18日 23:06:28Sanjeevsetfiles: + wsgi_xml_rpc.patch
keywords: + patch
2013年03月18日 18:43:32Sanjeevsetnosy: + Sanjeev
2010年07月09日 05:25:43terry.reedysetversions: + Python 3.2, - Python 2.6
2008年03月14日 19:29:50schmirsetnosy: + schmir
2008年01月06日 12:30:17christian.heimessetversions: + Python 2.6
2007年09月11日 06:20:18effbotsetassignee: effbot ->
messages: + msg55814
2007年06月30日 13:31:58gnarfkcreate

AltStyle によって変換されたページ (->オリジナル) /