
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2008-01-13 01:58 byalef13, last changed2022-04-11 14:56 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| cgi.py.patch | alef13,2008-01-13 05:13 | Patch for handling QUERY_STRING within POST | ||
| cgy.py.patch-1 | alef13,2008-01-15 23:55 | added suport for reading QUERY_STRING within POST | ||
| cgitest.py | alef13,2008-02-23 16:53 | Unit test for patched cgi module. | ||
| post_qs.patch | Nubis,2008-06-21 15:56 | Corrects handling of querystring in POST requests | ||
| post_qs_final.patch | Nubis,2008-06-21 18:10 | all of it is in this patch. | ||
| Messages (9) | |||
|---|---|---|---|
| msg59848 -(view) | Author: Alexandre Fiori (alef13) | Date: 2008-01-13 01:58 | |
It looks like module-cgi cannot handle GET and POST together when usingFieldStorage. For instance, a <form action="script.py?key=value"action="post"> is available through cgi.FormContent but notcgi.FieldStorage when there are other <input> in the html form.Very strange. | |||
| msg59849 -(view) | Author: Guido van Rossum (gvanrossum)*![]() | Date: 2008-01-13 04:14 | |
Well, what are you waiting for? Submit a patch! | |||
| msg59850 -(view) | Author: Alexandre Fiori (alef13) | Date: 2008-01-13 05:13 | |
Here it is, babe. I've made appropriate changes to make it readQUERY_STRING when it's available within POST method. It's currentlybeing parsed by parse_qsl() in read_urlencoded() as it should be inregular GET or POST. I didn't touch CONTENT_LENGTH since it has the sizeof 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 firstpatch for python. | |||
| msg59985 -(view) | Author: Alexandre Fiori (alef13) | Date: 2008-01-15 23:55 | |
Now I added support for parsing query string within multipart/*. Theonly issue now is that it mixes FieldStorage with MiniFieldStorage.However, I don't think it's a problem. | |||
| msg62772 -(view) | Author: Alexandre Fiori (alef13) | Date: 2008-02-23 16:53 | |
Here's the unit test for patched cgi module.There are three tests: one for HTML POST forms that are urlencoded, andtwo for multipart/form-data - with and without file upload. | |||
| msg68505 -(view) | Author: Nubis (Nubis) | Date: 2008-06-21 15:56 | |
This was pretty much done when I got here. It broked the other cgi_test(which tests some other corner cases).Patch includes modifications toLib/cgi.py and addsLib/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 letme know what else should I do to get it closed.thanks! | |||
| msg68513 -(view) | Author: Guido van Rossum (gvanrossum)*![]() | Date: 2008-06-21 16:41 | |
Thanks for your contribution!To get this commmitted, please draw the attention of someone else onpython-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. | |||
| msg68529 -(view) | Author: Nubis (Nubis) | Date: 2008-06-21 18:10 | |
I moved the test into the current test_cgi.py, and also added the docsand NEWS.This patch also includes all the previous changes and is the only onethat needs to be merged.Now I think it def should be closed :) | |||
| msg68534 -(view) | Author: Facundo Batista (facundobatista)*![]() | Date: 2008-06-21 18:59 | |
Commited the final Nubis' version inr64447. Fixed, :). Thank you all! | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:29 | admin | set | github: 46142 |
| 2008-06-21 18:59:06 | facundobatista | set | status: open -> closed nosy: +facundobatista resolution: fixed messages: +msg68534 |
| 2008-06-21 18:10:32 | Nubis | set | files: +post_qs_final.patch messages: +msg68529 |
| 2008-06-21 16:41:27 | gvanrossum | set | messages: +msg68513 |
| 2008-06-21 15:56:36 | Nubis | set | files: +post_qs.patch nosy: +Nubis messages: +msg68505 keywords: +patch versions: + Python 2.6 |
| 2008-02-23 16:53:05 | alef13 | set | files: +cgitest.py messages: +msg62772 |
| 2008-01-20 20:04:26 | christian.heimes | set | priority: normal type: enhancement components: + Library (Lib) |
| 2008-01-15 23:55:46 | alef13 | set | files: +cgy.py.patch-1 messages: +msg59985 |
| 2008-01-13 05:13:35 | alef13 | set | files: +cgi.py.patch messages: +msg59850 |
| 2008-01-13 04:14:21 | gvanrossum | set | keywords: +easy nosy: +gvanrossum messages: +msg59849 |
| 2008-01-13 01:58:54 | alef13 | create | |