Files
Rohit Behera f17b89b0c2 lib/http: return 416 for ranges --rc-serve and serve restic can't satisfy - fixes #10140
Before this change, a Range request starting at or after the end of the
object, or ending before it started, was answered with a 206 and a
malformed Content-Range such as "bytes 10-9/10". Resuming a complete
download with curl -C - or wget -c, which send such a range and expect a
416, saw a broken partial response instead.

After this change these requests get a 416 with "Content-Range: bytes */size",
and a Range on an empty object is ignored, the same as http.ServeContent
does for rclone serve http.
2026-10-29 18:28:49 +00:00
..