--- a/wsgi/request.py Tue Sep 02 10:30:28 2014 +0200
+++ b/wsgi/request.py Tue Sep 02 10:31:13 2014 +0200
@@ -25,6 +25,8 @@
__docformat__ = "restructuredtext en"
+import tempfile
+
from StringIO import StringIO
from urllib import quote
from urlparse import parse_qs
--- a/wsgi/test/unittest_wsgi.py Tue Sep 02 10:30:28 2014 +0200
+++ b/wsgi/test/unittest_wsgi.py Tue Sep 02 10:31:13 2014 +0200
@@ -48,6 +48,17 @@
self.assertTrue(req.https)
+ def test_big_content(self):
+ content = 'x'*100001
+ r = webtest.app.TestRequest.blank('/', {
+ 'CONTENT_LENGTH': len(content),
+ 'CONTENT_TYPE': 'text/plain',
+ 'wsgi.input': StringIO(content)})
+
+ req = CubicWebWsgiRequest(r.environ, self.vreg)
+
+ self.assertEqual(content, req.content.read())
+
@classmethod
def init_config(cls, config):
super(WSGIAppTC, cls).init_config(config)