Crafter.Network/implementations
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jorijn van der Graaf 7ee938c98e
feat(http1): ClientHTTP1::Fetch follows redirects by the RFC, on a URL type
One request to an http(s) URL with redirects followed by RFC 9110 §15.4:
301, 302, 303, 307 and 308 for every method; a 303 makes the request a
GET without its body and content headers, a 301 or 302 does so for a POST
alone, a 307 or 308 keeps the method and the body. The Location is
resolved against the sending URL by RFC 3986, a hop between http and
https is allowed, Authorization, Proxy-Authorization and Cookie are
dropped on a change of origin, and each hop is a client of its own, since
one ClientHTTP1 is one origin. A redirect without a usable Location, to
another scheme, back to a URL already visited or past maxRedirects comes
back as the response, with `stop` saying why.

The new :URL partition is the URL type behind it, exported: Parse,
Resolve (RFC 3986 §5.2; its §5.4 examples are the test), ToString, and
the pieces a request is built from.

This replaces the FetchHTTP1 free function, which followed redirects the
way Python's urllib did (its repeat limit, its quoting of the Location, a
POST turned back on a 307) for a port that no longer needs the fidelity.

Breaking: FetchHTTP1, FetchOptionsHTTP1 and FetchResultHTTP1 are gone;
use ClientHTTP1::Fetch, FetchOptions and FetchResult, whose `url` is a
URL and whose `limited` became `stop`.
2026-10-31 20:39:43 +01:00
..
Crafter.Network-ClientHTTP-Browser.cpp SPDX license 2026-07-22 17:55:45 +02:00
Crafter.Network-ClientHTTP.cpp SPDX license 2026-07-22 17:55:45 +02:00
Crafter.Network-ClientHTTP1.cpp feat(http1): ClientHTTP1::Fetch follows redirects by the RFC, on a URL type 2026-10-31 20:39:43 +01:00
Crafter.Network-ClientQUIC-Browser.cpp feat: TCP-only builds; TCP options and timeouts; receives that report and keep what arrived 2026-10-20 20:04:57 +02:00
Crafter.Network-ClientQUIC.cpp feat: TCP-only builds; TCP options and timeouts; receives that report and keep what arrived 2026-10-20 20:04:57 +02:00
Crafter.Network-ClientTCP.cpp feat(tcp): socket errors as std::system_error, with the phase that failed 2026-10-31 20:33:37 +01:00
Crafter.Network-ListenerHTTP.cpp feat(http): give ListenerHTTP the same fallback and query-strip routing 2026-07-28 19:42:06 +00:00
Crafter.Network-ListenerHTTP1.cpp test(https): give the TLS tests ports of their own 2026-07-28 20:34:23 +00:00
Crafter.Network-ListenerQUIC.cpp quic settings 2026-08-25 19:17:22 +02:00
Crafter.Network-ListenerTCP.cpp feat(tcp): ListenerTCP binds the address it is given, at port 0 if asked 2026-10-31 20:28:32 +01:00
Crafter.Network-Stream.cpp feat(tls): add a libssl TLS transport and an https:// HTTP/1.1 stack 2026-07-28 20:13:30 +00:00
Crafter.Network-TLS.cpp fix(tls): stop a peer that closed first from killing the process 2026-07-28 20:18:51 +00:00
Crafter.Network-WebTransport.cpp SPDX license 2026-07-22 17:55:45 +02:00