Skip to content

Releases: trillium-rs/trillium

trillium-forwarding-v0.3.1

Choose a tag to compare

Fixed

  • peer_ip is now taken from the rightmost forwarded-for entry 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
    own peer_ip.
  • forwarded-for entries with ports (192.0.2.60:8080, [2001:db8::17]:4711) now parse.
  • proto is compared case-insensitively, per RFC 7239.
  • Forwarding::trust_ips includes the offending string in its panic message.

trillium-compression-v0.3.4

Choose a tag to compare

Fixed

  • Accept-Encoding negotiation honors q=0, which RFC 9110 defines as "not acceptable". A coding
    sent with q=0 was previously only deprioritized, so Accept-Encoding: gzip;q=0 still received a
    gzip-encoded response.
  • The * wildcard is understood, supplying a quality value for every coding the header doesn't
    name, so *;q=0 opts out of compression entirely.

trillium-testing-v0.10.1

Choose a tag to compare

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.
  • TestServer requests are now never keepalive-pooled

trillium-server-common-v0.7.11

Choose a tag to compare

Added

  • Runtime::spawn_detached and a provided RuntimeTrait::spawn_detached, for spawning a task
    without a join handle. The type-erased Runtime path skips the completion-channel and
    join-handle allocations that spawn makes.

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 an async block
    that stored the inner future twice. Per-connection (HTTP/1.x) and per-stream (h2/h3) server
    tasks now use spawn_detached, further dropping steady-state memory under high connection
    or stream concurrency.
  • The default RuntimeTrait::timeout implementation no longer stores the timed-out future
    twice, for the same reason as above.

trillium-client-v0.9.15

Choose a tag to compare

Changed

  • Background driver tasks (h2 connection driver, h3 stream pumps, DoT connection driver) are
    spawned with Runtime::spawn_detached, skipping the completion-channel and join-handle
    allocations that spawn makes per task.

trillium-websockets-v0.8.3

Choose a tag to compare

Added

  • WebSocketConn::feed enqueues 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
    WebSocketHandler event loop) is polled for an inbound message and none is immediately
    available, or on flush/send.
  • WebSocketConn::flush writes any buffered outbound messages to the socket.

Changed

  • Messages delivered via WebSocketHandler's OutboundStream are now fed rather than
    individually flushed; the event loop flushes before waiting for new events, so outbound bursts
    coalesce. WebSocketConn::send is unchanged: it still flushes the message it sends.

trillium-caching-headers-v0.4.3

Choose a tag to compare

Fixed

  • The Etag and Modified handlers no longer evaluate If-None-Match and If-Modified-Since
    against unsuccessful responses. Previously a 500 error page or a 301 redirect carrying a matching
    validator was rewritten to 304 Not Modified — losing the error, the Location, or both — where
    RFC 9110 §13.2.1 requires redirects and
    failures to take precedence over preconditions.

  • Both handlers now evaluate preconditions only for GET and HEAD requests. Previously a
    successful POST, PUT, or DELETE whose response carried a validator matching the request's
    If-None-Match was reported as 304 Not Modified even though the mutation had been performed;
    such responses now pass through unchanged, per
    RFC 9110 §13.1.2 and
    §13.1.3.

  • The Etag handler generates an entity tag only for successful responses. Error and redirect
    bodies no longer receive an autogenerated Etag header; one set explicitly by another handler is
    passed through as before.

trillium-logger-v0.5.5

Choose a tag to compare

Added

  • Opt-in conn-start logging: Logger::with_start_logging emits 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 as Started {version} {method} {url}
    (the new trillium_logger::StartFormatter); Logger::with_start_formatter replaces it with any
    LogFormatter and implies with_start_logging. The same format is also available as
    formatters::start_formatter, a free function composable in tuples and as {start_formatter}
    in log_format!.
  • DevFormatter, a unit struct with the same output as dev_formatter. Logger::new() and
    logger() now return Logger<DevFormatter> instead of an opaque type, so a default logger has a
    nameable type.

trillium-http-v1.6.1

Choose a tag to compare

Fixed

  • Conn::host() now falls back to the :authority pseudo-header when no Host header is
    present, so it returns the request's host on HTTP/2 and HTTP/3, where clients generally
    omit Host. Previously it returned None for most h2/h3 requests.

trillium-tera-v0.5.0

Choose a tag to compare

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 now tera::TeraResult.
  • Breaking: TeraConnExt::assign now takes impl Into<Cow<'static, str>> for
    the key instead of &str, mirroring tera 2's Context::insert. String literals
    continue to work unchanged; non-'static keys need an explicit .to_string().

Added

  • Reexported tera::Error and tera::TeraResult.
  • Passthrough features for tera's fast (on by default, per tera's
    recommendation), preserve_order, and unicode.