swift/test
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
..
functional Let users know entity size in 416 responses 2016-11-30 10:52:08 -08:00
probe Merge "EC: reconstruct using non-durable fragments" 2016-11-07 23:45:11 +00:00
unit Let users know entity size in 416 responses 2016-11-30 10:52:08 -08:00
__init__.py test/(functional/probe):Replace python print operator with print function (pep H233, py33) 2015-08-20 11:42:58 +09:00
sample.conf Merge "Add a note for functional tests with Keystone." 2016-03-18 05:08:10 +00:00