﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
18781	FallbackStorage fails its purpose with uwsgi's default settings	Aymeric Augustin	nobody	"`FallbackStorage` stores up to 3072 bytes of messages in cookies and the remainder in the session.

This is controlled by `CookieStorage.max_cookie_size = 3072`.

Unfortunately:
- other HTTP headers can take more than 1024 bytes,
- uwsgi's default `buffer-size` is 4k,
- all the HTTP headers must fit in one uwsgi buffer, otherwise uwsgi barfs.

[http://projects.unbit.it/uwsgi/wiki/Doc uwsgi's doc] says:
> If you plan to receive big requests with a lot of headers you can increase this value upto 64k

`uwsgi` is a common WSGI app server. To reduce the likelihood of this problem, I suggest to reduce `CookieStorage.max_cookie_size`  to `2048`. This is rather arbitrary, but it gives a bit more headroom.

The main purpose of `FallbackStorage` is to store one or two messages in cookies, to avoid touching the session in possible. 2048 bytes is enough to store about 25 lines of text."	Cleanup/optimization	closed	contrib.messages	dev	Normal	fixed			Accepted	0	0	0	0	0	0
