Skip to content

FetchFS: getFileRange issues out-of-bounds chunk requests #24438

Open
@foxtacles

Description

@foxtacles

Version of emscripten/emsdk:

emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 4.0.9 (bbf1caa6e24f64fca9eb6a13a9e02d3f42123e77)
clang version 21.0.0git (https:/github.com/llvm/llvm-project 2f05451198e2f222ec66cec4892ada0509519290)
Target: wasm32-unknown-emscripten
Thread model: posix

The getFileRange function in FetchFS currently allows requests for chunks outside the file boundaries. The server will then respond with 416 Range Not Satisfiable, which is properly handled in the code but I think we should save ourselves the request in the first place.

I've applied the attached patch to resolve this problem. I'd submit a pull request but I don't have the time right now to set up a local test environment.

CC @JoeOsborn

bounds.patch

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