Skip to content

tower-http-0.7.1

Latest

Choose a tag to compare

@seanmonstar seanmonstar released this 31 Aug 14:51
c941451

Added

  • fs: add ServeDir::redirect_to_trailing_slash() to serve directory indexes directly instead of first redirecting to the trailing-slash path. The redirect remains the default (#728)
  • fs: add ignore_multi_range_requests() to ServeDir and ServeFile, serving the full representation when a request asks for multiple byte ranges. The existing 416 Range Not Satisfiable response remains the default (#727)
  • request-id: the constructors and accessors on the request-id layers, services, and RequestId are now const fn, so they can be used in const context (#716)

Changed

  • fs: the minimum http-range-header requirement is now 0.4.2 (#661)

Fixed

  • behavioral change: fs: make ServeDir::try_call propagate expected filesystem
    I/O errors when no fallback is configured, as documented, instead of converting
    them to 404 Not Found responses (#718)
  • decompression: don't end the body when a data frame with no remaining bytes
    arrives after the decompressor reports end-of-stream. Trailers following such a
    frame were dropped and could not be recovered (#722)
  • decompression: return a body error when a data frame with remaining bytes
    arrives after the decompressor reports end-of-stream, rather than silently
    truncating. This regressed in 0.7.0 (#712)
  • fs: multipart range requests are now rejected before range validation, so
    they consistently return 416 Range Not Satisfiable with a
    Cannot serve multipart range requests body instead of a generic
    unsatisfiable-range response (#661)
  • fs: range error responses no longer carry representation headers such as
    Content-Type and Content-Encoding (#727)
  • set-header: SetMultipleResponseHeadersLayer and SetMultipleResponseHeader
    are now Clone regardless of the response body type, matching the fix applied
    to the request-side types in 0.7.0 (#714)

All the changes

  • chore(deps): bump actions/checkout from 6 to 7 by @dependabot[bot] in #708
  • fix(compression): reject non-empty data frames after codec is EOF by @seanmonstar in #712
  • Remove Clone derivations from SetMultipleResponseHeader* types by @skeet70 in #714
  • feat(request-id): Allow request-id constructor in const context by @tottoto in #716
  • fs: Avoid unnecessary conversions between SystemTime and HttpDate by @tottoto in #717
  • fs: Use HeaderValue::is_empty to check for empty values by @tottoto in #720
  • fs: Use HeaderValue::to_str for date headers by @tottoto in #721
  • chore(deps): bump taiki-e/install-action from 2 to 2.85.4 by @dependabot[bot] in #715
  • chore(deps): bump taiki-e/install-action from 2.85.4 to 2.85.12 by @dependabot[bot] in #723
  • docs(example)/custom future with multiple bodies by @Reza-Darius in #711
  • fix(decompression): don't end the body on an empty data frame by @clemenslosbichler-cloud in #722
  • Propagate ServeDir::try_call I/O errors by @Boulea7 in #718
  • ci: Update to cargo-check-external-types 0.5.0 by @tottoto in #724
  • fix: reject multipart ranges before validation by @shblue21 in #661
  • chore(deps): bump taiki-e/install-action from 2.85.12 to 2.86.3 by @dependabot[bot] in #726
  • feat(services): configure directory redirects by @BreezeDelegate in #728
  • Allow ignoring unsupported multi-range requests by @BreezeDelegate in #727
  • chore(deps): bump taiki-e/install-action from 2.86.3 to 2.86.8 by @dependabot[bot] in #730
  • chore(release): prepare 0.7.1 by @jlizen in #729

New Contributors