swift/test/functional
Tim Burke e8a80e874a Let users know entity size in 416 responses
If a user sends a Range header with no satisfiable ranges, we send back
a 416 Requested Range Not Satisfiable response. Previously however,
there would be no indication of the size of the object they were
requesting, so they wouldn't know how to craft a satisfiable range. We
*do* send a Content-Length, but it is (correctly) the length of the
error message.

The RFC [1] has an answer for this:

>  A server generating a 416 (Range Not Satisfiable) response to a
>  byte-range request SHOULD send a Content-Range header field with an
>  unsatisfied-range value, as in the following example:
>
>    Content-Range: bytes */1234
>
>  The complete-length in a 416 response indicates the current length of
>  the selected representation.

Now, we'll send a Content-Range header for all 416 responses, including
those coming from the object server as well as those generated on a
proxy because of the Range mangling required to support EC policies.

[1] RFC 7233, section 4.2, although similar language was used in RFC
2616, sections 10.4.17 and 14.16

Change-Id: I80c7390fc6f84a10a212b0641bb07a64dfccbd45
2016-11-30 10:52:08 -08:00
..
__init__.py Add functional tests for new versioned_write mode 2016-09-25 19:45:38 -07:00
swift_test_client.py Improve functional tests and test client 2016-09-28 21:07:07 -07:00
test_access_control.py Add functional test for access control (RBAC INFO) with Keystone 2016-07-11 21:59:37 +00:00
test_account.py Remove executable flag from some test modules 2016-10-31 21:22:10 +00:00
test_container.py Fix typos in test_container.py 2016-11-17 02:07:24 +00:00
test_dlo.py Let users know entity size in 416 responses 2016-11-30 10:52:08 -08:00
test_object.py Handle deleted files with if-none-match 2016-11-22 21:06:24 -05:00
test_slo.py breaking up functional/tests.py a bit further 2016-11-22 21:51:21 -05:00
test_tempurl.py breaking up functional/tests.py a bit further 2016-11-22 21:51:21 -05:00
test_versioned_writes.py breaking down tests.py into smaller pieces 2016-11-21 12:16:17 +00:00
tests.py Let users know entity size in 416 responses 2016-11-30 10:52:08 -08:00