]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Updates to OSAPI sizelimit middleware.
authorDan Prince <dprince@redhat.com>
Tue, 19 Mar 2013 23:37:47 +0000 (19:37 -0400)
committerDan Prince <dprince@redhat.com>
Wed, 20 Mar 2013 04:01:01 +0000 (23:01 -0500)
commit3fe81851bab39a1466d8744b372b5a287b4db93d
tree6eadc1b3bff8f7946e4487872f31a0188257d2f8
parent4c5f27638f5e41557c4f5a4cce393c066cb65280
Updates to OSAPI sizelimit middleware.

Updates the OSAPI sizelimit middleware so that we use avoid calling
len on a request body which could cause a really large request
to get buffered into memory.

Also updates the middleware to return HTTP 413 which is a more
correct error code in this case (previously it returned just 400).

Fixes LP Bug #1131857.

Change-Id: Iff6cb0c24bc21e5a1d5dd4cf29acb0b4ee221708
cinder/api/middleware/sizelimit.py
cinder/tests/api/middleware/test_sizelimit.py