Closed bgerstle closed 6 years ago
Example failure:
Here are some examples of invalid ranges that could be used for the test:
10-0
(last > first)-78
(suffix greater than length of file)-0
(empty suffix range)78-
(first byte position beyond end of file)👍 makes sense to me. Any objections @jdesrosiers or others?
@bgerstle, Good catch! Can you create a PR for this? We should keep and fix the test for this scenario, then add others for the 416 cases.
Ideally it would be great if we could break the PartialContent test into multiple tests and separate them into their own suite.
According to RFC 7233 section 2.1: "if the [suffix length] value is greater than or equal to the length...the byte range is interpreted as the remainder of the representation." In other words, if I request the range
1-1000
for a file that's 5 bytes long, I should get a valid response withContent-Range: 1-4
.Instead, cob_spec requests the range
75-80
for a file that's 77 bytes long, and expects to receive a response with the416
status code and aContent-Range
header with the value*/77
.