galtsev wrote:
> Seems I found the problem with running wsgi application as Pylons
> controller: posted form data not available in wsgi application trough
> environ['wsgi.input']. This happens because at point, where wsgi
> application called, request input stream was already readed ( when
> PylonsBaseWSGIApp create WSGIRequest).
> Possible fix is to check controller's class before call setup_app_env
> in PylonsBaseWSGIApp, and don't call this method, if controller is not
> an ancestor of WSGIController.

Yes; this is a problem where the form data gets put in 
environ['paste.parsed_formvars'], but is lost from wsgi.input.  I 
thought the values were lazily parsed -- that is, unless you access 
pylons.request.POST (or .params) it won't consume wsgi.input.  But there 
might be something in Pylons that is looking at that.

I know Yaro has added support for paste.parsed_formvars, but other 
applications may not have.  Though it doesn't work for file uploads, I 
have a little replacement file object for wsgi.input, that creates a 
file-like object to replace wsgi.input, in FakeCGIBody at the bottom of 
http://svn.pythonpaste.org/Paste/WebOb/trunk/webob/__init__.py

-- 
Ian Bicking : [EMAIL PROTECTED] : http://blog.ianbicking.org
             : Write code, do good : http://topp.openplans.org/careers

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to