>
> Hi folks,
> we are experiencing an issue related to multipart forms: the client send
> that form, but our Pylons application receives bad information due to
> bad parse of the request.
> This is an example of received params:
> UnicodeMultiDict([('type', u'GenericAd'), ('category', u'67'),
> ('main_category', u'66'), ('category_66', u'67'), ('region', u'19'),
> ('province', u'17'), ('municipality', u'6951'), ('format', u'Ad'),
> ('telephone', u'01234566789'), ('telephone_2',
> u'0123456789\r\n------WebKitFormBoundaryaInD5WKU9eX3vTvC\r\nContent-Disposition:
> form-data; name="fax"\r\n\r\n1234567890'), ('e-mail',
> u'[email protected]'), ('website', u'http://www.asidev.com'),
> ('multiple_validator', u''), ('title', u'Sample'), ('reference',
> u'chr'), ('description', u"Sample description."), ('image', u''),
> ('issue',
> u'32\r\n------WebKitFormBoundaryaInD5WKU9eX3vTvC\r\nContent-Disposition:
> form-data; name="Salva"\r\n\r\n')])
>
> We solved this issue using post-processing, as described in the thread:
> http://lists.unbit.it/pipermail/uwsgi/2011-September/002556.html
> Do you know a better way to solve this issue?
>
> The same application works well using Apache+Mod_WSGI or paster serve.
>
> Best Regards,
> Stefano.
>
>
>

uWSGI does not want to support "unlimited" readline() as this can lead to
a security problem. Buffering that to disk (or pre-reading in memory) is
the safest choice. Do not worry about the "cost" of writing those datas to
disk: if the content-length is tinnier than the specified post-buffering
value, it will be read in memory.

I have plan to make detection of this readline() usage and automatically
enabling post-buffering
-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to