--- cgi.py 2008-01-13 02:56:50.000000000 -0200 +++ new-cgi.py 2008-01-13 02:59:05.000000000 -0200 @@ -457,6 +457,7 @@ if 'REQUEST_METHOD' in environ: method = environ['REQUEST_METHOD'].upper() if method == 'GET' or method == 'HEAD': + self.qs_get_with_post = None if 'QUERY_STRING' in environ: qs = environ['QUERY_STRING'] elif sys.argv[1:]: @@ -474,6 +475,8 @@ headers['content-type'] = "application/x-www-form-urlencoded" if 'CONTENT_TYPE' in environ: headers['content-type'] = environ['CONTENT_TYPE'] + if 'QUERY_STRING' in environ: + self.qs_get_with_post = '&' + environ['QUERY_STRING'] if 'CONTENT_LENGTH' in environ: headers['content-length'] = environ['CONTENT_LENGTH'] self.fp = fp or sys.stdin @@ -635,6 +638,8 @@ def read_urlencoded(self): """Internal: read data in query string format.""" qs = self.fp.read(self.length) + if self.qs_get_with_post: + qs += self.qs_get_with_post self.list = list = [] for key, value in parse_qsl(qs, self.keep_blank_values, self.strict_parsing):