Message55146
| Author |
gnarfk |
| Recipients |
| Date |
2007年06月30日.13:31:58 |
| SpamBayes Score |
| Marked as misclassified |
| Message-id |
| In-reply-to |
| Content |
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]
|
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2007年08月23日 16:12:56 | admin | link | issue1745722 messages |
| 2007年08月23日 16:12:56 | admin | create |
|