[Python-bugs-list] cgi parsing of query strings (PR#356)

mredar@yahoo.com mredar@yahoo.com
Tue, 13 Jun 2000 16:06:00 -0400 (EDT)


Full_Name: Mark Redar
Version: 1.5.2
OS: linux
Submission from: pat-global.digital-integrity.com (64.1.242.30)


I am currently starting to use the cgi module for python. In general it's quite
nice, I love
the builtin "test" function--very handy.

I do have a quibble with the handling of query strings by the parser. In the
HTML 4 specification, appendix B
 it is stated:

B.2.2 Ampersands in URI attribute values

            The URI that is constructed when a form is submitted may be used as
an anchor-style link (e.g., the href attribute for the A element).
Unfortunately, the use of
            the "&" character to separate form fields interacts with its use in
SGML attribute values to delimit character entity references. For example, to
use the URI
            "http://host/?x=1&y=2" as a linking URI, it must be written <A
href="http://host/?x=1&#38;y=2"> or <A href="http://host/?x=1&amp;y=2">.

            We recommend that HTTP server implementors, and in particular, CGI
implementors support the use of ";" in place of "&" to save authors the trouble
of escaping
            "&" characters in this manner.

The recommended handling of ';' as field delimiters is not implemented in this
module.

Do you have any plans to implement this feature?
My current company is going to use
the ';' separator and it works with other cgi packages (perl & java servlets).
I'd 
love to use python, but this is a stumbling block.

Thanks,

Mark