> On Sat, May 14, 2016 at 08:27:05PM +0200, Roberto De Ioris wrote:
>> So, at this point i think the current behaviour (default is
>> RFC-friendly,
>> but not apache friendly) is the "right" one. Probably we should add this
>> to the "ThingsToKnow" doc page.
>
> I wouldn't call that "RFC-friendly." The RFC merely states that the
> server is not obligated to close stdin. If it said "must not close
> stdin" then you could claim that current behaviour is RFC-compliant.
> However, the RFC merely leaves it up to the implementation, and the
> current uWSGI implementation is neither right nor wrong. To my
> knowledge, of all common CGI implementations, uWSGI is the only one that
> doesn't close STDIN after POST. All of the following do, and you will
> agree they probably cover 95% of the CGI market:
>
> - Apache
> - Fcgiwrap
> - Lighttpd
>
> So, of course, you could stick to your guns and claim that uWSGI is not
> technically violating the RFC, and therefore you don't have to change
> anything.


Sorry Konstantin, i am not sure to understand, you had a new release a
couple of days ago with a new option allowing your required needs. The
spirit of uWSGI is versatility without changing behaviours, so we add new
options every time we need to change something instead of breaking older
version. (yeah yeah, this resulted in lot of completely wrong defaults
during years, but i bet every sysadmin here prefer to tune a thing one
time and forget about it instead of checking for changes at every
release). Probably you are right and this should be the default behaviour,
but we do not change patterns without a looooong deprecation time.


However, is there a good reason to keep STDIN open after POST
> is done?  Is there a situation where this would be useful?


because this is what we get for free using the already available api's
that needs to support websockets or chunked input. If you want another
behaviour you have an option for changing it. I understand this is a crazy
thing: you can open websockets sessions via cgi in uWSGI with the default
setup :)

>
> Once all of POST is received, the CGI is supposed to produce output and
> exit, so keeping STDIN open just leaves an extra fd open for the
> duration of that CGI's execution. On a busy system, this can contribute
> to filedescriptor exhaustion.

in such a case just add the option we implemented for you for free :)


-- 
Roberto De Ioris
http://unbit.com
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to