diff options
Diffstat (limited to 'openstack/common/middleware/sizelimit.py')
-rw-r--r-- | openstack/common/middleware/sizelimit.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/openstack/common/middleware/sizelimit.py b/openstack/common/middleware/sizelimit.py index 45de527..96a1fbf 100644 --- a/openstack/common/middleware/sizelimit.py +++ b/openstack/common/middleware/sizelimit.py @@ -22,8 +22,9 @@ from oslo.config import cfg import webob.dec import webob.exc +from openstack.common.deprecated import wsgi from openstack.common.gettextutils import _ -from openstack.common import wsgi +from openstack.common.middleware import base #default request size is 112k @@ -40,7 +41,8 @@ CONF.register_opt(max_req_body_size) class LimitingReader(object): """Reader to limit the size of an incoming request.""" def __init__(self, data, limit): - """ + """Initiates LimitingReader object. + :param data: Underlying data object :param limit: maximum number of bytes the reader should allow """ @@ -66,7 +68,7 @@ class LimitingReader(object): return result -class RequestBodySizeLimiter(wsgi.Middleware): +class RequestBodySizeLimiter(base.Middleware): """Limit the size of incoming requests.""" def __init__(self, *args, **kwargs): |