Cinder doesn't work under Apache well with enabled debug.
In Python 2.x all header values should be a string.
Change-Id: Ie15b5f6836a60a6135ed2808380fa12c3281d5dd
Closes-Bug: #
1502881
raise exc.HTTPNotFound(explanation=error.msg)
except exception.VolumeSizeExceedsAvailableQuota as error:
raise exc.HTTPRequestEntityTooLarge(
- explanation=error.msg, headers={'Retry-After': 0})
+ explanation=error.msg, headers={'Retry-After': '0'})
except exception.VolumeLimitExceeded as error:
raise exc.HTTPRequestEntityTooLarge(
- explanation=error.msg, headers={'Retry-After': 0})
+ explanation=error.msg, headers={'Retry-After': '0'})
retval = self._view_builder.restore_summary(
req, dict(new_restore))
auth_key)
except exception.VolumeSizeExceedsAvailableQuota as error:
raise exc.HTTPRequestEntityTooLarge(
- explanation=error.msg, headers={'Retry-After': 0})
+ explanation=error.msg, headers={'Retry-After': '0'})
except exception.InvalidVolume as error:
raise exc.HTTPBadRequest(explanation=error.msg)
class QuotaError(CinderException):
message = _("Quota exceeded: code=%(code)s")
code = 413
- headers = {'Retry-After': 0}
+ headers = {'Retry-After': '0'}
safe = True
for request in requests:
exc = webob.exc.HTTPRequestEntityTooLarge
fault = wsgi.Fault(exc(explanation='sorry',
- headers={'Retry-After': 4}))
+ headers={'Retry-After': '4'}))
response = request.get_response(fault)
expected = {
"overLimit": {
"message": "sorry",
"code": 413,
- "retryAfter": 4,
+ "retryAfter": "4",
},
}
actual = jsonutils.loads(response.body)