mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
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.
This commit is contained in:
parent
83ff749827
commit
7e642e82d3
1 changed files with 1 additions and 2 deletions
|
@ -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(',')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue