> On Apr 25, 2016, at 11:06 AM, Ionel Cristian Mărieș <cont...@ionelmc.ro> 
> wrote:
> 
> 
> On Mon, Apr 25, 2016 at 5:46 PM, Donald Stufft <don...@stufft.io 
> <mailto:don...@stufft.io>> wrote:
> 
> Primarily it did that so that it could dynamically reject file uploads 
> without having to buffer them entirely in memory or on disk. Without 
> something asynchronous to the Python process then we end up having a hard 
> limit set in whatever the WSGI server is that buffers files to disk or 
> rejects file uploads over a certain size.
> 
> ​Sounds like a webserver feature (being able to stream the request​ body) 
> rather than a constraint that flows from the types of syscalls it use. 
> Doesn't gunicorn (prefork) allow streaming the request body?
> 


It does by default yes, but the problem is if you stream the request body 
instead of buffer it, then you need either a lot of threads or you need 
asynchronous IO to prevent a slowloris attack.

-----------------
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to