[mod_python] Vampire/mod_python determining type of argument - GET/POST

Graham Dumpleton grahamd at dscpl.com.au
Tue Nov 29 15:08:18 EST 2005

Strictly speaking, GET style form parameters, ie., those provided as  
part of the
query string appended to the URL are processed for any type of HTTP  
method type. A form supplied through the request content is only  
possible for
the POST request method type.

For the case of a POST request method type, some parameters could be  
of request content and others part of the query string appended to  
the URL, ie.,
there could be a mix of both. I don't believe one can distinguish  
between the
two in this case, except by parsing req.args explictly a second time  
parse_qsl from the mod_python.util module.


On 30/11/2005, at 6:54 AM, Brandon N wrote:

> I didn't realize it had to be either get or post, but I suppose  
> that makes sense.
> Thanks a lot.
> On 11/29/05, Graham Dumpleton <grahamd at dscpl.com.au> wrote:  
> Regardless of whether Vampire is used or not, whether GET or POST is
> used
> can be determined using "req.method". See request object
> documentation on
> mod_python site.
> On 30/11/2005, at 6:38 AM, Brandon N wrote:
> > I've been wondering, when using Vampire/mod_python, how one
> > determines whether a form argument came over GET or POST.
> > I'm using:
> > self._args = vampire.processForm( req )
> > to get the argument dictionary, and I'm not certain that there are
> > complementary functions or alternate ones to find this out.
> >
> > I ask because, as I understand it, the "rule" about GET not being
> > able to change state means I have to be wary of GETs for various
> > tasks (where a user might embed certain information in a link and
> > share it with unsuspecting others).
> >
> > Thanks in advance for any insight,
> > Brandon
> > _______________________________________________
> > Mod_python mailing list
> > Mod_python at modpython.org
> > http://mailman.modpython.org/mailman/listinfo/mod_python
> >

More information about the Mod_python mailing list