Skip to content

[pull] main from tower-rs:main#17

Merged
barjin merged 2 commits into
apify:mainfrom
tower-rs:main
May 22, 2026
Merged

[pull] main from tower-rs:main#17
barjin merged 2 commits into
apify:mainfrom
tower-rs:main

Conversation

@pull

@pull pull Bot commented May 21, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

* fix(services): handle trailing slash

* fix(services): handle trailing slashes on file requests

* fix(services): return 404 for file requests with trailing slash

* test: add test for file request with trailing slash and fallback

* fix(services): return 404 for single file requests with trailing slash

* revert SingleFile changes

* fix(services): correctly handle file requests with trailing slash

This fixes the regression while preserving the correct behavior for:
- Directories with trailing slash + `append_index_html_on_directories:
  true`
- Root path `/` (with or without trailing slash)
- Normal file requests

We now explicitly reject file + trailing-slash early in
`maybe_redirect_or_append_path`
and use a `PathResolution` enum for clearer control flow.

* satisfy clippy

* remove redundant syscall

* revert maybe_redirect_or_append_path to use Option
@pull pull Bot locked and limited conversation to collaborators May 21, 2026
@pull pull Bot added the ⤵️ pull label May 21, 2026
@pull pull Bot assigned barjin May 21, 2026
@pull pull Bot requested a review from barjin May 21, 2026 10:33
* refactor!: include grpc error message in tracing

* Address review feedback on grpc error message extraction

- Add #[repr(i32)] and #[non_exhaustive] to GrpcCode
- Add #[non_exhaustive] to GrpcFailureClass
- Fix behavioral regression: status codes >16 now correctly treated as non-success
- Use decode_utf8_lossy() instead of discarding on invalid UTF-8
- Impl std::error::Error for GrpcFailureClass
- Promote GrpcStatus methods to pub, add code_raw() and message() accessors
- Export GrpcStatus from classify module
- Add tests for percent-encoding, invalid UTF-8, unknown codes, and empty message

* Make percent-encoding a required dependency and address review feedback

- Remove cfg(feature = "trace") gate on percent-decoding: always use
  percent_decode().decode_utf8_lossy() for grpc-message extraction
- Make percent-encoding a non-optional dependency to simplify the code
- Add test for valid UTF-8 percent-encoded message
- Add test that GrpcCode::Ok is classified as success via ClassifyResponse

---------

Co-authored-by: Xiaoya Wei <xiaoya.wei@airbnb.com>
@barjin barjin merged commit 8c3722a into apify:main May 22, 2026
13 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants