You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee=Noneclosed_at=<Date2008-06-21.18:59:06.772>created_at=<Date2008-01-13.01:58:54.713>labels= ['easy', 'type-feature', 'library']
title='module-cgi: handling GET and POST together'updated_at=<Date2008-06-21.18:59:06.765>user='https://bugs.python.org/alef13'
It looks like module-cgi cannot handle GET and POST together when using
FieldStorage. For instance, a <form action="script.py?key=value"
action="post"> is available through cgi.FormContent but not
cgi.FieldStorage when there are other <input> in the html form.
Here it is, babe. I've made appropriate changes to make it read
QUERY_STRING when it's available within POST method. It's currently
being parsed by parse_qsl() in read_urlencoded() as it should be in
regular GET or POST. I didn't touch CONTENT_LENGTH since it has the size
of the POST data without QUERY_STRING's size. That would affect read()
of such POST data. It's working. Thanks for the incentive, it's my first
patch for python.
This was pretty much done when I got here. It broked the other cgi_test
(which tests some other corner cases).
Patch includes modifications to Lib/cgi.py and adds Lib/test/test_cgi_post_qs.py to test the new features.
This should be closed by now, but since this is my first patch, just let
me know what else should I do to get it closed.
To get this commmitted, please draw the attention of someone else on
python-dev (or if you're an IRC person try #python-dev at freenote,
IIRC). I'd recommend moving the tests into the existing test_cgi.py.