Change in cgi module's handling of POST requests

Paul Boddie paul at boddie.org.uk
Fri Feb 13 07:03:44 EST 2009


On 13 Feb, 11:58, "Gabriel Genellina" <gagsl-... at yahoo.com.ar> wrote:
>
> I noticed this change in behaviour too, and indeed, it is due to  http://bugs.python.org/issue1817
> But I could not find any RFC/standard/reccomendation/whatever that clearly  
> states *what* should happen with a POST request directed to an URI having  
> a query string itself. So I could not say "it's a bug" -- it's just...  
> annoying in these cases (although it might be useful in some other cases,  
> I think)

The issue of distinguishing between query-originating parameters and
form-originating parameters has been around for a very long time, and
in my own work, especially where the cgi module has been used, I've
been careful to distinguish between the two types and to merge them
only if this is desired (get_fields vs. get_fields_from_path and
get_fields_from_body in WebStack). If the cgi module has now changed
its behaviour to just merge the two data sources, I can imagine that a
few applications aren't going to be happy any more, and since I doubt
that I'm the only one to take the approach I've just described, I can
imagine that I'm not alone in regarding this "bug fix" as more of a
regression if it has been done in a way which does not preserve the
behaviour of unmodified existing code.

Paul



More information about the Python-list mailing list