Commit graph

5 commits

Author SHA1 Message Date
Ben Wiederhake
7ad95c78af LibHTTP: Remove unused header in HeaderList 2026-02-23 12:15:23 +01:00
Praise-Garfield
b270b2cacb LibHTTP: Fix inverted Content-Range complete-length parsing
parse_single_byte_content_range_as_values() has the condition on
consume_specific('*') inverted. When the complete-length is a
numeric value like "1000", the negated check causes the wildcard
branch to run, discarding the length. When it is "*" (unknown),
the else branch tries to parse digits after consuming the "*",
which fails entirely.

Removing the "!" fixes both cases so that "*" correctly produces
an empty complete_length, and numeric values are parsed normally.

Also adds an EOF check after parsing to reject trailing garbage,
matching the pattern used by parse_single_range_header_value().
2026-02-13 09:39:49 +01:00
Zaggy1024
99020b50a3 LibHTTP: Implement extraction of the Content-Range values in HeaderList 2026-01-29 05:22:27 -06:00
Sam Kravitz
bef8423f0f AK: Rename CaseInsensitiveStringTraits
To CaseInsensitiveASCIIStringTraits. This change indicates that these
traits are about ASCII-only insensitivity.
2025-12-31 10:24:42 +01:00
Timothy Flynn
9375660b64 LibHTTP+LibWeb+RequestServer: Move Fetch's HTTP header infra to LibHTTP
The end goal here is for LibHTTP to be the home of our RFC 9111 (HTTP
caching) implementation. We currently have one implementation in LibWeb
for our in-memory cache and another in RequestServer for our disk cache.

The implementations both largely revolve around interacting with HTTP
headers. But in LibWeb, we are using Fetch's header infra, and in RS we
are using are home-grown header infra from LibHTTP.

So to give these a common denominator, this patch replaces the LibHTTP
implementation with Fetch's infra. Our existing LibHTTP implementation
was not particularly compliant with any spec, so this at least gives us
a standards-based common implementation.

This migration also required moving a handful of other Fetch AOs over
to LibHTTP. (It turns out these AOs were all from the Fetch/Infra/HTTP
folder, so perhaps it makes sense for LibHTTP to be the implementation
of that entire set of facilities.)
2025-11-27 14:57:29 +01:00