oslo.middleware/oslo_middleware
Johan Guldmyr d6b74f5ce9
More details when logging 413 Entity Too Large
I spent a few days figuring out what was making the OS-FEDERATION
mapping rules create/update API calls return "413 Entity Too Large"
errors for our CentOS7/haproxy/apache/mod_wsgi/keystone/python2 setup.

To make this a bit easier for future users then I would like to include
max_request_body_size and its value in the response and also log the
error.

Retaining the "Request is too large." bit in the message is intended to
also make it easier to find where the limit is set.

Resulting log error in keystone looks like:

2019-07-04 06:52:13.217789 | ubuntu-bionic |  INFO
[oslo_middleware.sizelimit] Request is too large. Larger than
max_request_body_size (114688).

Change-Id: Ic66882afba25222ab8464ac9194c5002c8666db1
Closes-Bug: #1835363
Signed-off-by: Johan Guldmyr <johan.guldmyr@csc.fi>
2019-07-10 20:34:59 +03:00
..
healthcheck Do not use the deprecated best_match() method 2019-03-28 21:32:21 +01:00
locale Imported Translations from Zanata 2018-03-01 06:18:45 +00:00
tests Remove moxstubout usage 2018-08-21 23:42:53 -04:00
__init__.py add missing shortcut for HTTPProxyToWSGI middleware 2015-11-09 13:31:59 -05:00
_i18n.py Update URLs in documents according to document migration 2017-07-12 23:06:02 +08:00
base.py Update hacking version 2019-03-20 23:10:12 +08:00
catch_errors.py Fix invalid escape sequence warnings 2019-04-11 06:10:18 -05:00
correlation_id.py Replaces uuid.uuid4 with uuidutils.generate_uuid() 2016-12-07 04:10:58 +00:00
cors.py Replace git.openstack.org URLs with opendev.org URLs 2019-04-30 13:45:14 +08:00
debug.py Replace six.iteritems() with .items() 2016-12-09 10:37:30 +08:00
http_proxy_to_wsgi.py Remove Class HTTPProxyToWSGIMiddleware 2017-09-04 11:37:09 +08:00
opts.py Update hacking version 2019-03-20 23:10:12 +08:00
request_id.py Set global_request_id if passed in as X-OpenStack-Request-ID. 2017-05-23 12:48:41 -04:00
sizelimit.py More details when logging 413 Entity Too Large 2019-07-10 20:34:59 +03:00
ssl.py Limit ssl deprecation warning to external importers 2016-10-17 10:23:23 +08:00
stats.py Fix invalid escape sequence warnings 2019-04-11 06:10:18 -05:00
version.py pbr.version.VersionInfo needs package name (oslo.xyz and not oslo_xyz) 2017-02-06 12:49:22 -05:00