Apache Mod-Python - Commented: (MODPYTHON-38) Passing req.form into psp.PSP().

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > March 2005 > Commented: (MODPYTHON-38) Passing req.form into psp.PSP().





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Commented: (MODPYTHON-38) Passing req.form into psp.PSP().
Graham Dumpleton (JIRA)

2005-03-30, 7:20 pm

[ http://issues.apache.org/jira/brows...ts#action_61281 ]

Graham Dumpleton commented on MODPYTHON-38:
-------------------------------------------

Alternatively, and probably preferably, psp.PSP() should look explicitly
for the presence of req.form as may have been left by a prior parsing
of the form parameters. This would be better than a "form" parameter
as it would be transparent.

> Passing req.form into psp.PSP().
> --------------------------------
>
> Key: MODPYTHON-38
> URL: http://issues.apache.org/jira/browse/MODPYTHON-38
> Project: mod_python
> Type: Improvement
> Versions: 3.1.4
> Reporter: Graham Dumpleton
> Priority: Minor


>
> When calling psp.PSP() explicitly to render PSP pages, it will internally setup
> req.form if it determines that the form is accessed by the PSP page.
> Problem is that if you are wanting to trigger psp.PSP() from a publisher function
> any form parameters have already been processed and req.form created. For a
> POST request this is problematic as in doing this it will have consumed all the
> content of the request.
> This means that when the form is processed a second time by psp.PSP(), it will
> find no request content. Thus, the PSP page will only be able to make use of
> GET form parameters and not POST form parameters.
> It would be an improvement if psp.PSP() allowed a instance of util.FieldStorage
> which has previously been created to be passed in through the "form" parameter
> of the constructor. Ie.,
> template = psp. PSP(req,filename=path,vars=settings,form
=req.form)
> template.run()


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com