Kupu won't save through Deliverance
Symptoms
- When switching into Plone's edit mode, Kupu loads fine and all the controls and windows load and populate with all the existing data. Edits can be made on screen and the Submit button sends a POST back to Apache, but the response
- A problem with a PloneFormGen-generated form. Pressing the"submit" button results in a POST showing up in my Zope access log, and getting ignored. The form works fine from the native Plone interface or
through an Apache proxy, however.
Problem
The content-type header is missing in the POST request when accessed through the deliverance proxy.
This probably doesn't matter so much for the regular forms on the Plone site, but PloneFormGen and Kupu forms have enctype="multipart/form-data" which is being ignored.
The bug is in WSGIProxy's exactproxy.py, so it's technically not a Deliverance issue.
If you're in a virtualenv you can edit ./lib/python2.5/site-packages/WSGIProxy-0.1-py2.5.egg/wsgiproxy/exactproxy.py and make the following change:
79,80c79,80
< if environ.get('Content-Type'):
< headers['Content-Type'] = environ['Content-Type']
---
> if environ.get('CONTENT_TYPE'):
> headers['Content-Type'] = environ['CONTENT_TYPE']
Then restart the deliverance proxy. Kupu forms and PloneFormGen forms work now.
Source Code
http://svn.pythonpaste.org/Paste/WSGIProxy/trunk/ is the official repository
References
Kupu won't save through Deliverance
Solution to multipart/for-data submition trouble