Skip to content

fix(deps): update rust crate tower-http to 0.6.0#56

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/tower-http-0.x
Open

fix(deps): update rust crate tower-http to 0.6.0#56
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/tower-http-0.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented May 5, 2024

This PR contains the following updates:

Package Type Update Change
tower-http dependencies minor 0.4.40.6.0
tower-http dev-dependencies minor 0.4.40.6.0

Release Notes

tower-rs/tower-http (tower-http)

v0.6.11

Compare Source

Added

  • set-header: add SetMultipleResponseHeadersLayer and
    SetMultipleResponseHeader for setting multiple response headers at once.
    Supports overriding, appending, and if_not_present modes. Header
    values can be fixed or computed dynamically via closures (#​672)

    use http::{Response, header::{self, HeaderValue}};
    use http_body::Body as _;
    use tower_http::set_header::response::SetMultipleResponseHeadersLayer;
    
    let layer = SetMultipleResponseHeadersLayer::overriding(vec![
        (header::X_FRAME_OPTIONS, HeaderValue::from_static("DENY")).into(),
        (header::CONTENT_LENGTH, |res: &Response<MyBody>| {
            res.body().size_hint().exact()
                .map(|size| HeaderValue::from_str(&size.to_string()).unwrap())
        }).into(),
    ]);
  • set-header: add SetMultipleRequestHeadersLayer and
    SetMultipleRequestHeaders for setting multiple request headers at once,
    mirroring the response-side API (#​677)

  • classify: add From<i32> and From<NonZeroI32> impls for GrpcCode.
    Unrecognized status codes map to GrpcCode::Unknown (#​506)

Changed

  • compression: compress application/grpc-web responses. Previously all
    application/grpc* content types were excluded from compression; now only
    application/grpc (non-web) is excluded (#​408)

Fixed

  • fs: fix ServeDir returning 500 instead of 405 for non-GET/HEAD requests
    when call_fallback_on_method_not_allowed is enabled but no fallback service
    is configured (#​587)
  • fs: remove duplicate cfg attribute on is_reserved_dos_name (#​675)

All PRs

New Contributors

Full Changelog: tower-rs/tower-http@tower-http-0.6.10...tower-http-0.6.11

v0.6.10

Compare Source

Added

  • follow-redirect: expose Attempt::method() and Attempt::previous_method()
    so redirect policies can react to method changes across redirects (e.g.
    POST to GET on 301/303) (#​559)

Fixed

  • Restore tokio and async-compression as no-op features. These will be
    removed next breaking release (#​667)

What's Changed

New Contributors

Full Changelog: tower-rs/tower-http@tower-http-0.6.9...tower-http-0.6.10

v0.6.9

Compare Source

Added:

  • on-early-drop: middleware that detects when a response future or response
    body is dropped before completion (#​636)

    Two events get hooks: the response future being dropped before
    the inner service produces a response, and the response body being
    dropped before reaching end-of-stream.

    Install custom callbacks with OnEarlyDropLayer::builder():

    use http::Request;
    use tower_http::on_early_drop::{OnBodyDropFn, OnEarlyDropLayer};
    
    let layer = OnEarlyDropLayer::builder()
        .on_future_drop(|req: &Request<()>| {
            let uri = req.uri().clone();
            move || eprintln!("future dropped for {}", uri)
        })
        .on_body_drop(OnBodyDropFn::new(|req: &Request<()>| {
            let uri = req.uri().clone();
            move |parts: &http::response::Parts| {
                let status = parts.status;
                move || eprintln!("body dropped for {} status {}", uri, status)
            }
        }));

    Or route both events through a trace::OnFailure hook with
    EarlyDropsAsFailures. Place this layer inside a TraceLayer so the
    emitted events inherit the request span:

    use tower::ServiceBuilder;
    use tower_http::on_early_drop::{OnEarlyDropLayer, EarlyDropsAsFailures};
    use tower_http::trace::{DefaultOnFailure, TraceLayer};
    
    let stack = ServiceBuilder::new()
        .layer(TraceLayer::new_for_http())
        .layer(OnEarlyDropLayer::new(
            EarlyDropsAsFailures::new(DefaultOnFailure::default()),
        ));
  • fs: make AsyncReadBody::with_capacity public (#​415)

Changed:

  • The implicit async-compression feature is removed (#​642)
  • The implicit tokio feature is removed (#​628)
  • fs: no longer auto-enables the tracing crate feature; enable tracing
    explicitly to restore error logging on ServeDir IO failures (#​614)

Fixed

  • trace: restore failure classification at end-of-stream (#​483)
  • follow-redirect: support unicode URLs (swaps iri-string dep for
    url) (#​646)
  • fs: reject reserved Windows DOS device names (CON, COM1, etc.) in
    ServeDir (#​663)

All the PRs

New Contributors

Full Changelog: tower-rs/tower-http@tower-http-0.6.8...tower-http-0.6.9

v0.6.8

Compare Source

Fixed

  • Disable multiple_members in Gzip decoder, since HTTP context only uses one
    member. (#​621)

What's Changed

New Contributors

Full Changelog: tower-rs/tower-http@tower-http-0.6.7...tower-http-0.6.8

v0.6.7

Compare Source

Added

  • TimeoutLayer::with_status_code(status) to define the status code returned
    when timeout is reached. (#​599)

Deprecated

  • auth::require_authorization is too basic for real-world. (#​591)
  • TimeoutLayer::new() should be replaced with
    TimeoutLayer::with_status_code(). (Previously was
    StatusCode::REQUEST_TIMEOUT) (#​599)

Fixed

  • on_eos is now called even for successful responses. (#​580)
  • ServeDir: call fallback when filename is invalid (#​586)
  • decompression will not fail when body is empty (#​618)

New Contributors

Full Changelog: tower-rs/tower-http@tower-http-0.6.6...tower-http-0.6.7

v0.6.6

Compare Source

Fixed

  • compression: fix panic when looking in vary header (#​578)

New Contributors

Full Changelog: tower-rs/tower-http@tower-http-0.6.5...tower-http-0.6.6

v0.6.5

Compare Source

Added

  • normalize_path: add append_trailing_slash() mode (#​547)

Fixed

  • redirect: remove payload headers if redirect changes method to GET (#​575)
  • compression: avoid setting vary: accept-encoding if already set (#​572)

New Contributors

Full Changelog: tower-rs/tower-http@tower-http-0.6.4...tower-http-0.6.5

v0.6.4: tower-http 0.6.4

Compare Source

Added

  • decompression: Support HTTP responses containing multiple ZSTD frames (#​548)
  • The ServiceExt trait for chaining layers onto an arbitrary http service just
    like ServiceBuilderExt allows for ServiceBuilder (#​563)

Fixed

  • Remove unnecessary trait bounds on S::Error for Service impls of
    RequestBodyTimeout<S> and ResponseBodyTimeout<S> (#​533)
  • compression: Respect is_end_stream (#​535)
  • Fix a rare panic in fs::ServeDir (#​553)
  • Fix invalid content-lenght of 1 in response to range requests to empty
    files (#​556)
  • In AsyncRequireAuthorization, use the original inner service after it is
    ready, instead of using a clone (#​561)

v0.6.3: tower-http 0.6.3

Compare Source

This release was yanked because its definition of ServiceExt was quite unhelpful, in a way that's very unlikely that anybody would start depending on within the small timeframe before this was yanked, but that was technically breaking to change.

v0.6.2

Compare Source

Changed:

  • CompressionBody<B> now propagates B's size hint in its http_body::Body
    implementation, if compression is disabled (#​531)
    • this allows a content-length to be included in an HTTP message with this
      body for those cases

New Contributors

Full Changelog: tower-rs/tower-http@tower-http-0.6.1...tower-http-0.6.2

v0.6.1: v0.6.1

Compare Source

Fixed

  • decompression: reuse scratch buffer to significantly reduce allocations and improve performance (#​521)

New Contributors

v0.6.0: v0.6.0

Compare Source

Changed:

  • body module is disabled except for catch-panic, decompression-*, fs, or limit features (BREAKING) (#​477)
  • Update to tower 0.5 (#​503)

Fixed

  • fs: Precompression of static files now supports files without a file extension (#​507)

v0.5.2: v0.5.2

Compare Source

Added:

  • compression: Will now send a vary: accept-encoding header on compressed responses (#​399)
  • compression: Support x-gzip as equivalent to gzip in accept-encoding request header (#​467)

Fixed

  • compression: Skip compression for range requests (#​446)
  • compression: Skip compression for SSE responses by default (#​465)
  • cors: Actually keep Vary headers set by the inner service when setting response headers (#​473)
    • Version 0.5.1 intended to ship this, but the implementation was buggy and didn't actually do anything

v0.5.1: v0.5.1

Compare Source

  • fs: Support files precompressed with zstd in ServeFile
  • trace: Add default generic parameters for ResponseBody and ResponseFuture (#​455)
  • trace: Add type aliases HttpMakeClassifier and GrpcMakeClassifier (#​455)

Fixed

  • cors: Keep Vary headers set by the inner service when setting response headers (#​398)
  • fs: ServeDir now no longer redirects from /directory to /directory/
    if append_index_html_on_directories is disabled (#​421)

v0.5.0: v0.5.0

Compare Source

Changed

  • Bump Minimum Supported Rust Version to 1.66 (#​433)
  • Update to http-body 1.0 (#​348)
  • Update to http 1.0 (#​348)
  • Preserve service error type in RequestDecompression (#​368)

Fixed

  • Accepts range headers with ranges where the end of range goes past the end of the document by bumping
    http-range-header to 0.4

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the dependencies label May 5, 2024
@renovate renovate Bot force-pushed the renovate/tower-http-0.x branch 2 times, most recently from 23739f0 to b167dfa Compare May 9, 2024 18:10
@renovate renovate Bot force-pushed the renovate/tower-http-0.x branch from b167dfa to da96b8e Compare May 21, 2024 01:57
@renovate renovate Bot force-pushed the renovate/tower-http-0.x branch from da96b8e to 2cc3952 Compare June 13, 2024 22:28
@renovate renovate Bot force-pushed the renovate/tower-http-0.x branch from 2cc3952 to b1dcc7f Compare July 5, 2024 18:37
@renovate renovate Bot force-pushed the renovate/tower-http-0.x branch 2 times, most recently from ffe7408 to 63cb0bb Compare August 6, 2024 18:41
@renovate renovate Bot force-pushed the renovate/tower-http-0.x branch from 63cb0bb to 5a8d6b7 Compare September 2, 2024 15:31
@renovate renovate Bot force-pushed the renovate/tower-http-0.x branch from 5a8d6b7 to 4d4cf42 Compare September 20, 2024 02:06
@renovate renovate Bot changed the title fix(deps): update rust crate tower-http to 0.5.0 fix(deps): update rust crate tower-http to 0.6.0 Sep 20, 2024
@renovate renovate Bot force-pushed the renovate/tower-http-0.x branch 5 times, most recently from 90b9c8e to 79df449 Compare October 12, 2024 12:59
@renovate renovate Bot force-pushed the renovate/tower-http-0.x branch from 79df449 to f5070ac Compare October 23, 2024 19:28
@renovate renovate Bot force-pushed the renovate/tower-http-0.x branch from f5070ac to ad1dd39 Compare November 6, 2024 10:32
@renovate renovate Bot force-pushed the renovate/tower-http-0.x branch from ad1dd39 to c9167c3 Compare December 18, 2024 02:39
@renovate renovate Bot force-pushed the renovate/tower-http-0.x branch 2 times, most recently from 905076f to c7693fa Compare December 29, 2024 14:14
@renovate renovate Bot force-pushed the renovate/tower-http-0.x branch from c7693fa to b9d3b80 Compare January 10, 2025 23:05
@renovate renovate Bot force-pushed the renovate/tower-http-0.x branch from b9d3b80 to da2d37b Compare February 22, 2025 03:27
@renovate renovate Bot force-pushed the renovate/tower-http-0.x branch 2 times, most recently from 09d3cae to 518094c Compare March 19, 2025 22:56
@renovate renovate Bot force-pushed the renovate/tower-http-0.x branch from 518094c to c5d0137 Compare December 7, 2025 16:42
@renovate renovate Bot force-pushed the renovate/tower-http-0.x branch 3 times, most recently from 5c7db22 to 336e164 Compare April 18, 2026 11:09
@renovate renovate Bot force-pushed the renovate/tower-http-0.x branch 9 times, most recently from b42cf87 to f9bf4d9 Compare May 5, 2026 10:53
@renovate renovate Bot force-pushed the renovate/tower-http-0.x branch from f9bf4d9 to 7e9f2c3 Compare May 5, 2026 22:27
@LeoniePhiline
Copy link
Copy Markdown
Owner

Needs migration.

@renovate renovate Bot force-pushed the renovate/tower-http-0.x branch 8 times, most recently from 8654c81 to 8f75cb6 Compare May 15, 2026 09:39
@renovate renovate Bot force-pushed the renovate/tower-http-0.x branch 8 times, most recently from 951338b to eca62e1 Compare May 23, 2026 05:56
@renovate renovate Bot force-pushed the renovate/tower-http-0.x branch 2 times, most recently from e49b23b to e96f857 Compare May 25, 2026 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant