swift/test/functional
Darrell Bishop e2b03267fd Fix two edge cases with Range: header
This fixes swob to handle "Range: bytes=-X" where X > len(content); ex.
"Range: bytes=-17" when the object has 10 bytes. Based on the RFC, the
range is satisfiable and all bytes should be returned.

It also fixes "Range: bytes=-0" to be, correctly, not satisfiable.  In
addition, this case's response has Content-Length: 0 and has a zero-byte
body.

It also fixes an existing regression in swob for the case
"Range: bytes=100-" for a body of length < 100 (Content-Length was
negative and the body was returned).

The relevant RFC is 2616, section 14.35.1.

Change-Id: Ib3dc672e083173eb970c10801283813623f26e0e
2012-10-07 15:53:08 -07:00
..
2012-10-07 15:53:08 -07:00