maintaining order with cgi

Erik Max Francis max at alcyone.com
Tue Oct 22 21:40:48 CEST 2002


Daniel wrote:

> This may have already been asked and answered long ago but I saw
> nothing in google's archives.  Is there any way using the cgi.py
> (version 2.6) that came with python 2.2 to retrieve the name/value
> pairs in the order they were submitted by the client rather than using
> the FieldStorage dictionary?  Ordinarily a cgi script would know what
> values to look for, but I'm working with a more generic case where it
> doesn't, and order is important.
> 
> Am I stuck grabbing code out of cgi.py and modifying it to call
> parse_qsl more, or is there something already available that I missed
> in cgi.py that would be a faster means to an end?

Looks like you're stuck.

Even if the source of the form is unknown, it's not clear to me what
good knowing the order of the options in the CGI query is going to do
you.  As far as I know, the browser gives it no significance.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ The people are to be taken in very small doses.
\__/ Ralph Waldo Emerson
    Bosskey.net: Quake III Arena / http://www.bosskey.net/q3a/
 A personal guide to Quake III Arena.



More information about the Python-list mailing list