Skip to content

Commit

Permalink
Merge branch 'master' into decompression-keep-error-type
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpdrsn committed Nov 20, 2023
2 parents e139528 + d663cbf commit d850ff1
Show file tree
Hide file tree
Showing 48 changed files with 650 additions and 597 deletions.
107 changes: 45 additions & 62 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,23 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Check
uses: actions-rs/cargo@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Install protoc
uses: taiki-e/install-action@v2
with:
command: check
args: --workspace --all-features --all-targets
tool: protoc@3.20.3
- run: cargo check --workspace --all-features --all-targets

check-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Install protoc
uses: taiki-e/install-action@v2
with:
toolchain: stable
profile: minimal
tool: protoc@3.20.3
- name: cargo doc
working-directory: ${{ matrix.subcrate }}
env:
Expand All @@ -39,14 +36,13 @@ jobs:
cargo-hack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@cargo-hack
- name: Install protoc
uses: taiki-e/install-action@v2
with:
toolchain: stable
profile: minimal
- name: Install cargo-hack
run: |
curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin
tool: protoc@3.20.3
- name: cargo hack check
working-directory: ${{ matrix.subcrate }}
env:
Expand All @@ -61,50 +57,41 @@ jobs:
matrix:
rust: [stable, beta, nightly]
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- name: Run tests
uses: actions-rs/cargo@v1
- name: Install protoc
uses: taiki-e/install-action@v2
with:
command: test
args: --workspace --all-features
tool: protoc@3.20.3
- run: cargo test --workspace --all-features

test-msrv:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@1.66
- name: Install protoc
uses: taiki-e/install-action@v2
with:
toolchain: 1.60.0
profile: minimal
override: true
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: -p tower-http --all-features
toolchain: 1.60.0
tool: protoc@3.20.3
- run: cargo test -p tower-http --all-features

style:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt
profile: minimal
- name: rustfmt
uses: actions-rs/cargo@v1
- name: Install protoc
uses: taiki-e/install-action@v2
with:
command: fmt
args: --all -- --check
tool: protoc@3.20.3
- run: cargo fmt --all --check

deny-check:
name: cargo-deny check
Expand All @@ -113,25 +100,21 @@ jobs:
strategy:
matrix:
checks:
- advisories
- bans licenses sources
- advisories
- bans licenses sources
steps:
- uses: actions/checkout@v2
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check ${{ matrix.checks }}
arguments: --all-features --manifest-path tower-http/Cargo.toml
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check ${{ matrix.checks }}
arguments: --all-features --manifest-path tower-http/Cargo.toml

cargo-public-api-crates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
override: true
profile: minimal
- uses: Swatinem/rust-cache@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
- name: Install cargo-public-api-crates
run: |
cargo install --git https://github.com/davidpdrsn/cargo-public-api-crates
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The [examples] folder contains various examples of how to use Tower HTTP:

## Minimum supported Rust version

tower-http's MSRV is 1.60.
tower-http's MSRV is 1.66.

## Getting Help

Expand Down
10 changes: 2 additions & 8 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
vulnerability = "deny"
unmaintained = "warn"
notice = "warn"
ignore = [
# Potential Unix segfault with time crate, used by chrono.
# if setting env vars in threaded context, we are unlikely affected
# https://github.com/time-rs/time/issues/293
"RUSTSEC-2020-0159",
]
ignore = []

[licenses]
unlicensed = "deny"
Expand All @@ -34,9 +29,8 @@ license-files = [
]

[bans]
multiple-versions = "deny"
multiple-versions = "warn"
highlight = "all"
skip-tree = [{ name = "tower", version = ">=0.3, <=0.4" }]

[sources]
unknown-registry = "warn"
Expand Down
4 changes: 2 additions & 2 deletions examples/axum-key-value-store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "axum-key-value-store"
version = "0.1.0"
authors = ["Tower Maintainers <team@tower-rs.com>"]
edition = "2018"
edition = "2021"
publish = false
license = "MIT"

Expand All @@ -14,4 +14,4 @@ tower-http = { path = "../../tower-http", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3.11", features = ["env-filter"] }
axum = "0.6"
clap = { version = "3.1.13", features = ["derive"] }
clap = { version = "4.3.16", features = ["derive"] }
10 changes: 5 additions & 5 deletions examples/tonic-key-value-store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
name = "tonic-key-value-store"
version = "0.1.0"
authors = ["Tower Maintainers <team@tower-rs.com>"]
edition = "2018"
edition = "2021"
publish = false
license = "MIT"

[dependencies]
bytes = "1"
hyper = { version = "0.14.4", features = ["full"] }
prost = "0.8"
prost = "0.11"
tokio = { version = "1.2.0", features = ["full"] }
futures = "0.3"
tokio-stream = { version = "0.1", features = ["sync", "net"] }
tonic = "0.5"
tonic = "0.9"
tower = { version = "0.4.5", features = ["full"] }
tower-http = { path = "../../tower-http", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
clap = { version = "3.1.13", features = ["derive"] }
clap = { version = "4.3.16", features = ["derive"] }

[build-dependencies]
tonic-build = "0.5"
tonic-build = "0.9"
1 change: 0 additions & 1 deletion examples/tonic-key-value-store/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
fn main() {
tonic_build::configure()
.format(false)
.compile(&["key_value_store.proto"], &["proto"])
.unwrap();
}
4 changes: 2 additions & 2 deletions examples/warp-key-value-store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
name = "warp-key-value-store"
version = "0.1.0"
authors = ["Tower Maintainers <team@tower-rs.com>"]
edition = "2018"
edition = "2021"
publish = false
license = "MIT"

[dependencies]
bytes = "1"
clap = { version = "3.1.13", features = ["derive"] }
clap = { version = "4.3.16", features = ["derive"] }
hyper = { version = "0.14.4", features = ["full"] }
tokio = { version = "1.2.0", features = ["full"] }
tower = { version = "0.4.5", features = ["full"] }
Expand Down
52 changes: 48 additions & 4 deletions tower-http/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,65 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Added

- **request_id:** Derive `Default` for `MakeRequestUuid` ([#335])
- **fs:** Derive `Default` for `ServeFileSystemResponseBody` ([#336])
- None.

## Changed

- **decompression:** Enable `multiple_members` for `GzipDecoder` ([#354])
- Bump Minimum Supported Rust Version to 1.66 ([#433])

## Removed

- None.

## Fixed

- None.
- 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`

[#418]: https://github.com/tower-rs/tower-http/pull/418
[#433]: https://github.com/tower-rs/tower-http/pull/433

# 0.4.2 (July 19, 2023)

## Added

- **cors:** Add support for private network preflights ([#373])
- **compression:** Implement `Default` for `DecompressionBody` ([#370])

## Changed

- **compression:** Update to async-compression 0.4 ([#371])

## Fixed

- **compression:** Override default brotli compression level 11 -> 4 ([#356])
- **trace:** Simplify dynamic tracing level application ([#380])
- **normalize_path:** Fix path normalization for preceding slashes ([#359])

[#356]: https://github.com/tower-rs/tower-http/pull/356
[#359]: https://github.com/tower-rs/tower-http/pull/359
[#370]: https://github.com/tower-rs/tower-http/pull/370
[#371]: https://github.com/tower-rs/tower-http/pull/371
[#373]: https://github.com/tower-rs/tower-http/pull/373
[#380]: https://github.com/tower-rs/tower-http/pull/380

# 0.4.1 (June 20, 2023)

## Added

- **request_id:** Derive `Default` for `MakeRequestUuid` ([#335])
- **fs:** Derive `Default` for `ServeFileSystemResponseBody` ([#336])
- **compression:** Expose compression quality on the CompressionLayer ([#333])

## Fixed

- **compression:** Improve parsing of `Accept-Encoding` request header ([#220])
- **normalize_path:** Fix path normalization of index route ([#347])
- **decompression:** Enable `multiple_members` for `GzipDecoder` ([#354])

[#347]: https://github.com/tower-rs/tower-http/pull/347
[#333]: https://github.com/tower-rs/tower-http/pull/333
[#220]: https://github.com/tower-rs/tower-http/pull/220
[#335]: https://github.com/tower-rs/tower-http/pull/335
[#336]: https://github.com/tower-rs/tower-http/pull/336
[#354]: https://github.com/tower-rs/tower-http/pull/354
Expand Down
Loading

0 comments on commit d850ff1

Please sign in to comment.