[web2py] Re: Web server with support for chunked transfer encoding
Hi I Trier data = request.body.read() But it returned nothing You can easily test it with curl and Chunked transfer encoding header If it works for you let me know Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Web server with support for chunked transfer encoding
I think rocket works fine for this. It is just that you may uploading the content in the body and not in a variable therefore web2py does not know how to parse it. try look into data = request.body.read() On Thursday, 8 November 2018 08:18:41 UTC-8, icodk wrote: > > Tried with Rocket No error but request.args and request.vars are empty > The client sends: > > POST /controller/statdata HTTP/1.1 > Host: myserver.com:8082 > Content-Type:application/json > Transfer-Encoding: chunked > > and then sends the chunked data > > Rokets log shows: > 192.168.1.3, 2018-11-08 16:46:57, POST, /controller/statdata, HTTP/1.1, > 200, 0.017997 > > Any idea on the subject are welcome > > > > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Web server with support for chunked transfer encoding
Printing the request object shows something like: < gluon.rocket.ChunkedReader object at 0x00AFFB10 > , So there are signes that it is actually supported Also : 'wsgi_input': < gluon.rocket.ChunkedReader object at 0x00AFFB10 > , can be found in the request I am using source with pg8000 installed. The reason I use chunked tranfer is because my device is small so I can't buffer all the data to see how long it is, and POST it with Content lenght header. Of cours I could use enginx. Rocket is nice for development. On Thursday, November 8, 2018 at 5:18:41 PM UTC+1, icodk wrote: > > Tried with Rocket No error but request.args and request.vars are empty > The client sends: > > POST /controller/statdata HTTP/1.1 > Host: myserver.com:8082 > Content-Type:application/json > Transfer-Encoding: chunked > > and then sends the chunked data > > Rokets log shows: > 192.168.1.3, 2018-11-08 16:46:57, POST, /controller/statdata, HTTP/1.1, > 200, 0.017997 > > Any idea on the subject are welcome > > > > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Web server with support for chunked transfer encoding
On Thursday, November 8, 2018 at 8:18:41 AM UTC-8, icodk wrote: > > Tried with Rocket No error but request.args and request.vars are empty > The client sends: > > POST /controller/statdata HTTP/1.1 > Host: myserver.com:8082 > Content-Type:application/json > Transfer-Encoding: chunked > > and then sends the chunked data > > Rokets log shows: > 192.168.1.3, 2018-11-08 16:46:57, POST, /controller/statdata, HTTP/1.1, > 200, 0.017997 > > Any idea on the subject are welcome > I have only done very brief experimenting with chunked data, and I dont remember if that was with Rocket. I would recommend using NGinx instead, especially if the reason for going chunked is because of large files. Rocket isn't good with large files; I'm not sure where "large" starts for Rocket, but 1M is definitely large. /dps > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.