]> granicus.if.org Git - python/commitdiff
Patch by Jeff Rush:
authorGuido van Rossum <guido@python.org>
Mon, 7 Dec 1998 04:08:03 +0000 (04:08 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 7 Dec 1998 04:08:03 +0000 (04:08 +0000)
In CGIHTTPServer.py, the list of acceptable formats is -split-
on spaces but -joined- on commas, resulting in double commas
in the joined text.  It appears harmless to my browser but
ought to be fixed anyway.

    'A, B, C' -> 'A,', 'B,', 'C,' -> 'A,,B,,C'

Lib/CGIHTTPServer.py

index 24bdeef7974594a1f1eebf4a892fe4a87b7eded2..806ef575556f373f50012340fcfacd7ad707afac 100644 (file)
@@ -145,7 +145,7 @@ class CGIHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
                 if line[:1] in string.whitespace:
                     accept.append(string.strip(line))
                 else:
-                    accept = accept + string.split(line[7:])
+                    accept = accept + string.split(line[7:], ',')
             env['HTTP_ACCEPT'] = string.joinfields(accept, ',')
             ua = self.headers.getheader('user-agent')
             if ua: