Releases: trillium-rs/trillium
Release list
trillium-forwarding-v0.3.1
Fixed
peer_ipis now taken from the rightmostforwarded-forentry that isn't itself a trusted
proxy, walking right to left, instead of the leftmost entry. Because the forwarded-for chain is
append-only, everything to the left of the entry added by the outermost trusted proxy is
attacker-controlled, so the previous behavior let any client behind a trusted proxy choose its
ownpeer_ip.- forwarded-for entries with ports (
192.0.2.60:8080,[2001:db8::17]:4711) now parse. protois compared case-insensitively, per RFC 7239.Forwarding::trust_ipsincludes the offending string in its panic message.
trillium-compression-v0.3.4
Fixed
Accept-Encodingnegotiation honorsq=0, which RFC 9110 defines as "not acceptable". A coding
sent withq=0was previously only deprioritized, soAccept-Encoding: gzip;q=0still received a
gzip-encoded response.- The
*wildcard is understood, supplying a quality value for every coding the header doesn't
name, so*;q=0opts out of compression entirely.
trillium-testing-v0.10.1
Changed
- Test-server tasks are spawned with
Runtime::spawn_detached, skipping per-task
completion-channel and join-handle allocations. Requires trillium-server-common 0.7.11. TestServerrequests are now never keepalive-pooled
trillium-server-common-v0.7.11
Added
Runtime::spawn_detachedand a providedRuntimeTrait::spawn_detached, for spawning a task
without a join handle. The type-erasedRuntimepath skips the completion-channel and
join-handle allocations thatspawnmakes.
Changed
- Halved the task allocation size for every future spawned through the type-erased
Runtime:
the output-forwarding wrapper is now a hand-written combinator instead of anasyncblock
that stored the inner future twice. Per-connection (HTTP/1.x) and per-stream (h2/h3) server
tasks now usespawn_detached, further dropping steady-state memory under high connection
or stream concurrency. - The default
RuntimeTrait::timeoutimplementation no longer stores the timed-out future
twice, for the same reason as above.
trillium-client-v0.9.15
Changed
- Background driver tasks (h2 connection driver, h3 stream pumps, DoT connection driver) are
spawned withRuntime::spawn_detached, skipping the completion-channel and join-handle
allocations thatspawnmakes per task.
trillium-websockets-v0.8.3
Added
WebSocketConn::feedenqueues a message into an internal write buffer without immediately
writing it to the socket, allowing bursts of messages to coalesce into fewer socket writes.
Buffered messages are written out when the buffer fills, when the conn (or the
WebSocketHandlerevent loop) is polled for an inbound message and none is immediately
available, or onflush/send.WebSocketConn::flushwrites any buffered outbound messages to the socket.
Changed
- Messages delivered via
WebSocketHandler'sOutboundStreamare now fed rather than
individually flushed; the event loop flushes before waiting for new events, so outbound bursts
coalesce.WebSocketConn::sendis unchanged: it still flushes the message it sends.
trillium-caching-headers-v0.4.3
Fixed
-
The
EtagandModifiedhandlers no longer evaluateIf-None-MatchandIf-Modified-Since
against unsuccessful responses. Previously a 500 error page or a 301 redirect carrying a matching
validator was rewritten to304 Not Modified— losing the error, theLocation, or both — where
RFC 9110 §13.2.1 requires redirects and
failures to take precedence over preconditions. -
Both handlers now evaluate preconditions only for
GETandHEADrequests. Previously a
successfulPOST,PUT, orDELETEwhose response carried a validator matching the request's
If-None-Matchwas reported as304 Not Modifiedeven though the mutation had been performed;
such responses now pass through unchanged, per
RFC 9110 §13.1.2 and
§13.1.3. -
The
Etaghandler generates an entity tag only for successful responses. Error and redirect
bodies no longer receive an autogeneratedEtagheader; one set explicitly by another handler is
passed through as before.
trillium-logger-v0.5.5
Added
- Opt-in conn-start logging:
Logger::with_start_loggingemits a line when each conn is received,
before downstream handlers run, in addition to the existing completion line — so requests that
never complete still leave a record. The start line renders asStarted {version} {method} {url}
(the newtrillium_logger::StartFormatter);Logger::with_start_formatterreplaces it with any
LogFormatterand implieswith_start_logging. The same format is also available as
formatters::start_formatter, a free function composable in tuples and as{start_formatter}
inlog_format!. DevFormatter, a unit struct with the same output asdev_formatter.Logger::new()and
logger()now returnLogger<DevFormatter>instead of an opaque type, so a default logger has a
nameable type.
trillium-http-v1.6.1
Fixed
Conn::host()now falls back to the:authoritypseudo-header when noHostheader is
present, so it returns the request's host on HTTP/2 and HTTP/3, where clients generally
omitHost. Previously it returnedNonefor most h2/h3 requests.
trillium-tera-v0.5.0
Changed
- Breaking: Upgraded to tera 2.0.
tera::Tera,tera::Context, and the
filter/function/test traits are reexported from tera 2, so any custom filters,
functions, or tests need to be updated for tera's new signatures.tera::Result
is nowtera::TeraResult. - Breaking:
TeraConnExt::assignnow takesimpl Into<Cow<'static, str>>for
the key instead of&str, mirroring tera 2'sContext::insert. String literals
continue to work unchanged; non-'statickeys need an explicit.to_string().
Added
- Reexported
tera::Errorandtera::TeraResult. - Passthrough features for tera's
fast(on by default, per tera's
recommendation),preserve_order, andunicode.