[mod_python] Re: GET works, but POST doesn't in mod_python

Ole Jacob Hagen waterthrill at yahoo.no
Mon Aug 9 11:10:40 EDT 2004


Hi.

Read comments:



Ole Jacob Hagen wrote:

>
> user=mod_python
> database=psp
>
> When  method = \"GET\" in s
> bot_frame will produce following output:
>
> req.method is a GET[Field('user', 'mod_python'), Field('database', 
> 'psp')]
> length of incoming message is: 0
>
> Which is correct, but when method=\"POST\" in s, bot_frame will 
> produce following output:
> req.method is a POST[]
> length of incoming message is: 28
>
>
I can retrieve the message using req.read(), which will produce the 
following output:
output: user=mod_python&database=psp

I imagined that req.read() could read both GET and POST, but I believe 
this is not happening.
If I use a POST, then I need to parse the form data, and chech for POST 
method, and the same thing if req.method=="GET"

Why is it like this?

Cheers,

Ole J.





More information about the Mod_python mailing list