Skip to content

rc-serve and serve restic answer unsatisfiable Range requests with a malformed 206 #10140

Closed

Description

@r0h1tb

Before you start

  • I have searched the forum and the existing issues for this problem.
  • I have tested with the latest beta or stable release and can still reproduce the problem.
  • This is a reproducible bug, not a usage question.

Associated forum post URL

None.

What is the problem you are having with rclone?

rclone rcd --rc-serve and rclone serve restic answer a Range request that can't be satisfied with a 206 and a malformed Content-Range instead of 416 Range Not Satisfiable. Both go through lib/http/serve.Object. rclone serve http uses http.ServeContent and gets this right.

With a 10 byte file:

Range --rc-serve serve http
bytes=10- 206, Content-Range: bytes 10-9/10 416, Content-Range: bytes */10
bytes=20- 206, Content-Range: bytes 20-9/10, no Content-Length 416
bytes=5-2 206, serves bytes 5-9 416

bytes=10- is what curl -C - and wget -c send to resume a download that is already complete; they rely on the 416 to know the file is done.

rclone version

rclone v1.76.0-DEV
- os/version: darwin 26.1 (64 bit)
- os/kernel: 25.1.0 (arm64)
- os/type: darwin
- os/arch: arm64 (ARMv8 compatible)
- go/version: go1.26.0
- go/linking: dynamic
- go/tags: none

Built from master at 0c9826d.

Operating system

macOS

Which cloud storage system are you using?

Local filesystem (any backend is affected).

Output of rclone config redacted

No remotes, serving a local path.

The command you were trying to run

printf 0123456789 > /tmp/demo/srv/f.txt
rclone rcd --rc-serve --rc-no-auth --rc-addr 127.0.0.1:5599
curl -g -s -o /dev/null -D - -H 'Range: bytes=10-' 'http://127.0.0.1:5599/[/tmp/demo/srv]/f.txt'
HTTP/1.1 206 Partial Content
Content-Length: 0
Content-Range: bytes 10-9/10

A log from the command with the -vv flag

DEBUG : rclone: Version "v1.76.0-DEV" starting with parameters ["rclone" "rcd" "-vv" "--rc-serve" "--rc-no-auth" "--rc-addr" "127.0.0.1:5599"]
NOTICE: Serving remote control on http://127.0.0.1:5599/
DEBUG : Creating backend with remote "/tmp/demo/srv"

Nothing relevant is logged; the problem is in the response.

Activity

  1. ncw commented on Oct 29, 2026

    @ncw
    Member

    I've merged @r0h1tb fix for this to master now which means it will be in the latest beta in 15-30 minutes and released in v1.76

  2. added a commit that references this issue on Oct 29, 2026
    f17b89b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions