Skip to content

Fastly returns 206 response instead of 416 #13159

@jpalus

Description

@jpalus

Current Behavior

I'm already aware of #2771 as well as rust-lang/cargo#8647 but I think this issue is somewhat different.

Trying to resume download of already fully retrieved crate tarball:

  1. Returns code 206
  2. content-range header is completely wrong (ie content-range: bytes 278076-278075/278076 start of range is after end of range!)

Expected Behavior

If file is fully retrieved and requested range is past end of target file then I'd expect response 416 Requested Range Not Satisfiable

Steps To Reproduce

  1. Download crate tarball:
$ curl -L -o syn.tgz https://crates.io/api/v1/crates/syn/2.0.87/download # equivalent to wget -O syn.tgz <url>
  1. Try to resume download ie to make sure previous download was not interrupted with Range: starting at the current size of syn.tgz:
$ curl -vL -r `du -b syn.tgz | cut -f1`- -o syn.tgz https://crates.io/api/v1/crates/syn/2.0.87/download # equivalent of wget -c -O syn.tgz <url>

Environment

N/A

Anything else?

I do realize it's an issue in AWS but sadly I don't have any point of contact there so I'm hoping you can help out :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions