Commit 868cb87
fix: clamp suffix ranges exceeding file size instead of returning 416
RFC 7233 Section 2.1 states that if the selected representation is
shorter than the specified suffix-length, the entire representation
is used.
`bytes=-999` on a 500-byte file now returns `bytes 0-499/500` (206)
instead of 416.1 parent d970a80 commit 868cb87
2 files changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
480 | 480 | | |
481 | 481 | | |
482 | 482 | | |
483 | | - | |
484 | | - | |
485 | | - | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
0 commit comments