Skip to content

Conversation

@sinnren
Copy link
Contributor

@sinnren sinnren commented Dec 24, 2024

in function "detail::range_error",check range pos and content_length:
// Range must be within content length if (!(0 <= first_pos && first_pos <= last_pos && last_pos <= contant_len - 1)) { return true; }

use res.set_file_content in callback, set "content_length_" in res.set_content_provider function, but res.set_content_provider is after "detail::range_error", cause "detail::range_error" return true(error).

to solve this problem,put "detail::range_error()" after file content served, it's ok.

@yhirose yhirose merged commit d647f48 into yhirose:master Dec 24, 2024
4 checks passed
@yhirose
Copy link
Owner

yhirose commented Dec 24, 2024

@sinnren thanks for your contribution!

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.

3 participants