summaryrefslogtreecommitdiffstats
path: root/keystone/exception.py
diff options
context:
space:
mode:
authorDan Prince <dprince@redhat.com>2013-01-12 22:22:42 -0500
committerDan Prince <dprince@redhat.com>2013-01-21 19:54:29 -0500
commit7691276b869a86c2b75631d5bede9f61e030d9d8 (patch)
tree42da4e3aec16d1473f66a4f6463e3d8248f4207c /keystone/exception.py
parent8748cfa3a6b7573550e7ec8ced87e6fd2096a628 (diff)
downloadkeystone-7691276b869a86c2b75631d5bede9f61e030d9d8.tar.gz
keystone-7691276b869a86c2b75631d5bede9f61e030d9d8.tar.xz
keystone-7691276b869a86c2b75631d5bede9f61e030d9d8.zip
Limit the size of HTTP requests.
Adds a new RequestBodySizeLimiter middleware to guard against really large HTTP requests. The default max request size is 112k although this limit is configurable via the 'max_request_body_size' config parameter. Fixes LP Bug #1099025. Change-Id: Id51be3d9a0d829d63d55a92dca61a39a17629785
Diffstat (limited to 'keystone/exception.py')
-rw-r--r--keystone/exception.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/keystone/exception.py b/keystone/exception.py
index 26697e0d..2787e064 100644
--- a/keystone/exception.py
+++ b/keystone/exception.py
@@ -173,6 +173,12 @@ class Conflict(Error):
title = 'Conflict'
+class RequestTooLarge(Error):
+ """Request is too large."""
+ code = 413
+ title = 'Request is too large.'
+
+
class UnexpectedError(Error):
"""An unexpected error prevented the server from fulfilling your request.