summaryrefslogtreecommitdiffstats
path: root/Lib/BaseHTTPServer.py
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-02-09 05:07:04 (GMT)
committerEric S. Raymond <esr@thyrsus.com>2001-02-09 05:07:04 (GMT)
commitb49f4a4b15228799aad77ba569971a23d21cc4f7 (patch)
treefca74bb59fa56fde8e2a23f209b41157172977d9 /Lib/BaseHTTPServer.py
parent20e4423adef209d2260fd952533dc2360e2d257e (diff)
downloadcpython-b49f4a4b15228799aad77ba569971a23d21cc4f7.zip
cpython-b49f4a4b15228799aad77ba569971a23d21cc4f7.tar.gz
cpython-b49f4a4b15228799aad77ba569971a23d21cc4f7.tar.bz2
String method conversion.
Diffstat (limited to 'Lib/BaseHTTPServer.py')
-rw-r--r--Lib/BaseHTTPServer.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/BaseHTTPServer.py b/Lib/BaseHTTPServer.py
index 2f17938..8d90345 100644
--- a/Lib/BaseHTTPServer.py
+++ b/Lib/BaseHTTPServer.py
@@ -68,7 +68,6 @@ __all__ = ["HTTPServer", "BaseHTTPRequestHandler"]
import sys
import time
import socket # For gethostbyaddr()
-import string
import mimetools
import SocketServer
@@ -203,7 +202,7 @@ class BaseHTTPRequestHandler(SocketServer.StreamRequestHandler):
"""
# The Python system version, truncated to its first component.
- sys_version = "Python/" + string.split(sys.version)[0]
+ sys_version = "Python/" + sys.version.split()[0]
# The server software version. You may want to override this.
# The format is multiple whitespace-separated strings,
@@ -228,7 +227,7 @@ class BaseHTTPRequestHandler(SocketServer.StreamRequestHandler):
elif requestline[-1:] == '\n':
requestline = requestline[:-1]
self.requestline = requestline
- words = string.split(requestline)
+ words = requestline.split()
if len(words) == 3:
[command, path, version] = words
if version[:5] != 'HTTP/':
@@ -468,7 +467,7 @@ def test(HandlerClass = BaseHTTPRequestHandler,
"""
if sys.argv[1:]:
- port = string.atoi(sys.argv[1])
+ port = sys.argv[1].atoi()
else:
port = 8000
server_address = ('', port)