Skip to content

Conversation

@Darksonn
Copy link

Thanks to @mufeedvh for reporting this bug.

@Darksonn Darksonn force-pushed the underflow-try-range-response branch from 430699d to d5b43a3 Compare November 19, 2025 18:27
@seanmonstar
Copy link
Member

Just to add a note from spec:

For a GET request, a valid bytes range-spec is satisfiable if it is either:

  • an int-range with a first-pos that is less than the current length of the selected representation

So, with a file of 0 bytes, the first-pos of 0 is not less than the length, and thus is now rejected.

@yanns
Copy link
Collaborator

yanns commented Nov 19, 2025

From CI:

error: the borrowed expression implements the required traits
   --> axum-extra/src/response/file_stream.rs:615:34
    |
615 |         std::fs::write(filename, &[]).unwrap();
    |                                  ^^^ help: change this to: `[]`

@Darksonn Darksonn force-pushed the underflow-try-range-response branch from d5b43a3 to 4d568ab Compare November 19, 2025 21:30
@Darksonn
Copy link
Author

Fixed thanks.

@Darksonn Darksonn force-pushed the underflow-try-range-response branch from f86bcea to 24c5b86 Compare November 21, 2025 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants