[Web-SIG] cgi module doesn't process query string values with
POST, old bug report (fwd)
sholden at holdenweb.com
Tue Nov 11 08:57:46 EST 2003
[John J Lee]
> > From: Irmen de Jong <irmen at -NOSPAM-REMOVETHIS-xs4all.nl>
> > Subject: cgi module doesn't process query string values
> with POST, old bug
> > report
> > Newsgroups: comp.lang.python
> > Date: Mon, 10 Nov 2003 22:50:30 +0100
> > Hello
> > I've got a nuisance with the cgi module. (Python 2.3.2)
> > When processing a HTTP POST request, it ignores the
> > query string parameters that may also be present.
> > I.e. only the parameters from the POST body are processed.
> > I've looked at a rather old bug report on SF;
> > but that bug is closed. The last comment is from Steve Holden,
> > and it says "...My approach will be to have the new functionality
> > depend on the provision of additional keyword arguments..."
> > Can somebody comment on this? (Steve?) I can't seem to find any
> > of this logic in the current (2.3.2) cgi.py module.
> > Is it in there somewhere or has this bug been forgotten?
> > I have now added some code myself after creating a FieldStorage
> > object, to parse any additional query args using cgi.parse_qsl.
> > This way any query args are added to my form fields, possibly
> > overwriting the fields that were sent in the POST body.
> > But Steve's comment in the old bug report made me wonder
> > why the standard cgi module doesn't include this possibility.
> > --Irmen de Jong
Maybe I need to update the comment: I discussed this with Guido and
pointed out that the code seemed rather fragile. He agreed, and said
that one of the problems with making any changes at all to the CGI
module is the layer-upon-layer of fixing that has been done to what
started out as fairly simple code.
So I decided not to proceed with a patch,. but never annotated that
Does this list collectively feel it's worth trying to get something
together that a) works nd b) doesn't cause any incompatibility problems
or failed tests?
Steve Holden +1 703 278 8281 http://www.holdenweb.com/
Improve the Internet http://vancouver-webpages.com/CacheNow/
Python Web Programming http://pydish.holdenweb.com/pwp/
Interview with GvR August 14, 2003 http://www.onlamp.com/python/
More information about the Web-SIG