summaryrefslogtreecommitdiffstats
path: root/Lib/xmlrpc/server.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-26 16:32:26 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-26 16:32:26 (GMT)
commit2442015af26321083d4a2d75c096c8b732f049b2 (patch)
tree24cb8bc1fd46815ecc6e795cfcc008e7a576c672 /Lib/xmlrpc/server.py
parent744c2cd32585c1aeb1b78063cc6dda740d59c0c0 (diff)
downloadcpython-2442015af26321083d4a2d75c096c8b732f049b2.zip
cpython-2442015af26321083d4a2d75c096c8b732f049b2.tar.gz
cpython-2442015af26321083d4a2d75c096c8b732f049b2.tar.bz2
Create http package. #2883.
Diffstat (limited to 'Lib/xmlrpc/server.py')
-rw-r--r--Lib/xmlrpc/server.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/xmlrpc/server.py b/Lib/xmlrpc/server.py
index 9668c8c..4ddc004 100644
--- a/Lib/xmlrpc/server.py
+++ b/Lib/xmlrpc/server.py
@@ -105,8 +105,9 @@ server.handle_request()
# Based on code written by Fredrik Lundh.
from xmlrpc.client import Fault, dumps, loads
+from http.server import BaseHTTPRequestHandler
+import http.server
import socketserver
-import BaseHTTPServer
import sys
import os
import re
@@ -408,7 +409,7 @@ class SimpleXMLRPCDispatcher:
else:
raise Exception('method "%s" is not supported' % method)
-class SimpleXMLRPCRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
+class SimpleXMLRPCRequestHandler(BaseHTTPRequestHandler):
"""Simple XML-RPC request handler class.
Handles all HTTP POST requests and attempts to decode them as
@@ -500,7 +501,7 @@ class SimpleXMLRPCRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
"""Selectively log an accepted request."""
if self.server.logRequests:
- BaseHTTPServer.BaseHTTPRequestHandler.log_request(self, code, size)
+ BaseHTTPRequestHandler.log_request(self, code, size)
class SimpleXMLRPCServer(socketserver.TCPServer,
SimpleXMLRPCDispatcher):
@@ -560,10 +561,9 @@ class CGIXMLRPCRequestHandler(SimpleXMLRPCDispatcher):
"""
code = 400
- message, explain = \
- BaseHTTPServer.BaseHTTPRequestHandler.responses[code]
+ message, explain = BaseHTTPRequestHandler.responses[code]
- response = BaseHTTPServer.DEFAULT_ERROR_MESSAGE % \
+ response = http.server.DEFAULT_ERROR_MESSAGE % \
{
'code' : code,
'message' : message,