Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9228cbd

Browse files
committed
Patch by Jeff Rush:
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'
1 parent 391c8b4 commit 9228cbd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/CGIHTTPServer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def run_cgi(self):
145145
if line[:1] in string.whitespace:
146146
accept.append(string.strip(line))
147147
else:
148-
accept = accept + string.split(line[7:])
148+
accept = accept + string.split(line[7:], ',')
149149
env['HTTP_ACCEPT'] = string.joinfields(accept, ',')
150150
ua = self.headers.getheader('user-agent')
151151
if ua:

0 commit comments

Comments
 (0)