I was able to handle it:
try:
import gluon
if isinstance(request.env.wsgi_input, gluon.rocket.ChunkedReader):
body = ''
while True:
try:
s = request.env.wsgi_input.read(1)
if s == '':
break
body += s
except:
break
else:
body = request.body.read()
Any suggestion to make it better?
Thanks.
2012. december 3., hétfő 13:10:31 UTC+1 időpontban Niphlod a következőt
írta:
>
> don't know if it's a design decision but request.body is filled only if
> there is a content-length header, otherwise a StringIO() is returned.
>
> you can still read the contents iterating over request.env.wsgi_input
>
> On Monday, December 3, 2012 12:30:38 PM UTC+1, szimszon wrote:
>>
>> Version 2.2.1 (2012-11-04 20:45:19) stable
>>
>>
--