Some of the characters (form feed, vertical tab) are not
legal continuation characters anyway, so this was wrong as
well as annoying.
import os
import sys
-import string
import urllib
import BaseHTTPServer
import SimpleHTTPServer
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(',')