LibWeb: Skip range requests for media if the server won't accept them

Currently, this just respects the reported value from Accept-Ranges,
but we could also just try sending a range request and see if the
server rejects it, then fall back to a normal request after. For now,
this is fine, and we can make it use a fallback later if needed.
This commit is contained in:
Zaggy1024
2026-01-26 19:35:29 -06:00
committed by Gregory Bertilson
parent e8dcf5fad2
commit 4eb310cd3f
Notes: github-actions[bot] 2026-02-06 10:55:38 +00:00
2 changed files with 7 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ Optional<Vector<ByteString>> Header::extract_header_values() const
// For now we only parse some headers that are of the ABNF list form "#something"
if (name.is_one_of_ignoring_ascii_case(
"Accept-Ranges"sv,
"Access-Control-Request-Headers"sv,
"Access-Control-Expose-Headers"sv,
"Access-Control-Allow-Headers"sv,