6 Commits

Author SHA1 Message Date
John Woffindin
d11e83aaf8 Incorrect range handling for some edge cases
Why:

Incorrect range handling cases causes s3manager downloads to fail.

* When end extends beyond available data it should return data from
  "start" to the end of the available data. Currently it returns
  invalid range error.

  From RFC-7233:

  > If the last-byte-pos value is.. greater than or equal to the current
  > length of the representation data, the byte range is interpreted as
  > the remainder of the representation (i.e., the server replaces the
  > value of last-byte-pos with a value that is one less than the current
  > length of the selected representation).

* A "-0" suffix byte range is "not satisfiable" according to RFC and
  should return an invalid range error. Currently it just returns an
  empty data set.

  Also from RFC-7233:

  > If a valid byte-range-set includes ... or at least one
  > suffix-byte-range-spec with a non-zero suffix-length, then the
  > byte-range-set is satisfiable.  Otherwise, the byte-range-set is
  > unsatisfiable.
2019-07-29 11:11:24 +12:00
shabbyrobe
efe8c17100 Replace "clever" clamping in Range header handling with proper error 2019-03-11 22:45:32 +11:00
shabbyrobe
d577d33c28 Fix unsatisfiable range error 2019-03-11 22:31:54 +11:00
shabbyrobe
4300f1c98c Add tests for range 2019-01-19 23:13:55 +11:00
shabbyrobe
ad5efdc02b Clarify docs 2019-01-18 01:48:58 +11:00
shabbyrobe
a6d5228489 Object ranges 2019-01-18 01:47:40 +11:00