summaryrefslogtreecommitdiffstats
path: root/Lib/CGIHTTPServer.py
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-02-09 12:10:26 (GMT)
committerEric S. Raymond <esr@thyrsus.com>2001-02-09 12:10:26 (GMT)
commit7e642e82d3429d9b4f583ba0e81a27e5ea02d5ca (patch)
tree33896b6308124d254ac3e390ae14e7d51843480d /Lib/CGIHTTPServer.py
parent83ff7498272c5f3acbda9b3cad0e2044ab7547c2 (diff)
downloadcpython-7e642e82d3429d9b4f583ba0e81a27e5ea02d5ca.zip
cpython-7e642e82d3429d9b4f583ba0e81a27e5ea02d5ca.tar.gz
cpython-7e642e82d3429d9b4f583ba0e81a27e5ea02d5ca.tar.bz2
Eliminate use of string.whitespace and a string import with it.
Some of the characters (form feed, vertical tab) are not legal continuation characters anyway, so this was wrong as well as annoying.
Diffstat (limited to 'Lib/CGIHTTPServer.py')
-rw-r--r--Lib/CGIHTTPServer.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/CGIHTTPServer.py b/Lib/CGIHTTPServer.py
index 84cdf67..d6afaa1 100644
--- a/Lib/CGIHTTPServer.py
+++ b/Lib/CGIHTTPServer.py
@@ -23,7 +23,6 @@ __all__ = ["CGIHTTPRequestHandler"]
import os
import sys
-import string
import urllib
import BaseHTTPServer
import SimpleHTTPServer
@@ -164,7 +163,7 @@ class CGIHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
env['CONTENT_LENGTH'] = length
accept = []
for line in self.headers.getallmatchingheaders('accept'):
- if line[:1] in string.whitespace:
+ if line[:1] in "\t\n\r ":
accept.append(line.strip())
else:
accept = accept + line[7:].split(',')