Hi all, as promised uWSGI 2.1 will not be limited anymore to 16bit request
size.

All of the protocols (except uwsgi/suwsgi/uwsgip obviously) can now manage
64bit request size. By default the buffer size is limited to 4k as always
(yeah, i know this is annoying for someone, but unfortunately moving to 8k
would result in an automatic double in memory usage for users of async
modes, so we need to think about it a little bit more).

This means that users of mercurial (that makes an heavy use of http
headers to carry blobs) can now use it with uWSGI simply setting
http/fastcgi/scgi/... protocols.

>From the plugin developers point of view there are two major changes:

uwsgi.buffer_size is 64bit, and the old pointer has been mapped to
uwsgi.__buffer_size (to retain ABI compatibility).

wsgi_req->uh->pktsize has been renamed to wsgi_req->uh->_pktsize to avoid
errors, as the new way for checking the request size is wsgi_req->len

wsgi_req->uh->_pktsize is meaningful only for plugins directly dealing
with uwsgi protocol.

Take in account that even if uwsgi requests are limited to 16bit (by
protocol specs), internally you are free to extend it to 64bit, so you are
able to add request-vars via internal routing framework. So having a
buffer-size > 64k could be useful even for plain uwsgi mode.

To be more clear:

- you set buffer size to 100k
- you receive a 8000 bytes requests from nginx.
- via internal routing you add a variable FOO=x * 80000
- your internal request buffer is now 88000 bytes, and it is still valid
as it is lower than 100k

but:

- nginx sending a huge 80k request (that will overflow)
- albeit the buffer is 100k the uwsgi protocol can carry only 64k, so the
request will be detected as broken and the connection closed.

This commit is very invasive, thanks to Adriano Di Luzio (a new member of
the uWSGI team) we are improving our test suite, but i expect corner bugs
;) . Every report will be welcomed.

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

Reply via email to