Crafter.Network/interfaces
Repository files (latest commit first)
Filename Latest commit message Latest commit date
catbot 4d5ef7c96b feat(http1): dispatch unmatched paths to an optional fallback handler
The route map only answers paths that are known when the listener is
built. A route with an unbounded segment — /shop/<slug>, /order/<token>,
/posts/<id> — cannot be pre-registered: the token space is unbounded and
the product set changes while the server runs. Every such request became
a synthetic 404 that the application never got to see.

Add one optional member, called for anything `routes` missed, with the
full target still in request.path. Precedence is exact path, then the
query-stripped path, then fallback, then the 404 as before, so a
default-constructed listener behaves byte-identically and no call site
changes.

A hook rather than a pattern syntax: consumers that already have a
router — one shared between a wasm frontend and the server, so a URL
cannot mean different things to a crawler and to the app — keep using
it, and there is no second route table to disagree with the first.

PathWithoutQuery moves out of this file into :HTTP as an exported
PathWithoutQueryHTTP, since ListenerHTTP now needs the same split and a
fallback handler almost always does too.

ListenerAsyncHTTP1 starts accepting inside its constructor, so assigning
`listener.fallback` afterwards would race the accept loop; it gets a
constructor overload that installs the fallback before the thread
starts.
2026-07-28 19:41:57 +00:00
..
Crafter.Network-ClientHTTP.cppm SPDX license 2026-07-22 17:55:45 +02:00
Crafter.Network-ClientHTTP1.cppm docs(http1): document the HTTP/1.1 stack, and expose the client's timeout 2026-07-27 01:02:37 +00:00
Crafter.Network-ClientQUIC.cppm SPDX license 2026-07-22 17:55:45 +02:00
Crafter.Network-ClientTCP.cppm SPDX license 2026-07-22 17:55:45 +02:00
Crafter.Network-HTTP.cppm feat(http1): dispatch unmatched paths to an optional fallback handler 2026-07-28 19:41:57 +00:00
Crafter.Network-HTTP1.cppm feat(http1): add an HTTP/1.1 client and listener 2026-07-27 00:45:09 +00:00
Crafter.Network-HTTP3.cppm SPDX license 2026-07-22 17:55:45 +02:00
Crafter.Network-ListenerHTTP.cppm SPDX license 2026-07-22 17:55:45 +02:00
Crafter.Network-ListenerHTTP1.cppm feat(http1): dispatch unmatched paths to an optional fallback handler 2026-07-28 19:41:57 +00:00
Crafter.Network-ListenerQUIC.cppm SPDX license 2026-07-22 17:55:45 +02:00
Crafter.Network-ListenerTCP.cppm SPDX license 2026-07-22 17:55:45 +02:00
Crafter.Network-WebTransport.cppm SPDX license 2026-07-22 17:55:45 +02:00
Crafter.Network.cppm feat(http1): add an HTTP/1.1 client and listener 2026-07-27 00:45:09 +00:00