that's because with chunked encoding when you read the 1st byte you don't know how many other bites are coming (lacking the content-length, you can't tell in advance "how many bytes is the request")
On Monday, December 3, 2012 1:26:55 PM UTC+1, szimszon wrote: > > Wow. Thanks for the hint :) > > Funny that the variables have a different type in *chunked*: > > request.body: <type 'cStringIO.StringO'> > request.env.wsgi_input: <class 'gluon.rocket.ChunkedReader'> > > and in *Content-Lenght* context: > > request.body: <type 'file'> > request.env.wsgi_input: <class 'socket._fileobject'> > > > > > 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 >>> >>> --