Re: [web2py] uwsgi and post-buffering

173 views
Skip to first unread message

Roberto De Ioris

unread,
Nov 29, 2012, 10:40:27 AM11/29/12
to web...@googlegroups.com

> Hi all,
> this is my first post here so allow me to give my compliments to Mr. Di
> Pierro and all the people that works on this wonderful project.
> I do not have a big experience in web programming, i came from "offline"
> :)
> programming and triyng to add value to the products of my software house
> with online capabilities
> so i'm in "learning mode" (about 1 month now) with python uwsgi nginx and
> all the web stuff in general
>
> i have implemented a nginx+uwsgi_emperor+web2py multisite solution on a
> new
> server that will serve (in future) different sites and services for our
> company and customers. (it works great for now :)
>
> i'm a little worried about a sentence in this page:
> http://projects.unbit.it/uwsgi/wiki/ThingsToKnow
>
> I do not understand this paragraph:
> "If an http request has a body (like a POST request generated by a form)
> you have to read it in the application."
> [...] "If you do not do it, the communication socket with your webserver
> could be clobbered."
>
> i want to implement a lot of restful calls in many parts of my sites and
> i'm ok reading the body of a legit request
> but i don't know how to handle NON legit requests...
> do i need to read the body in any case??

The important thing is always reading the body of legit requests to avoid
nginx closing the socket abruptuly sending back error to the client (even
if the response was correctly generated).

For non-legit request i think (hope ?) it is not a problem being rejected
by nginx.


--
Roberto De Ioris
http://unbit.it
Reply all
Reply to author
Forward
0 new messages