New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make TrailingSlash enum accessible #1673
make TrailingSlash enum accessible #1673
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1673 +/- ##
==========================================
+ Coverage 53.29% 53.43% +0.14%
==========================================
Files 123 121 -2
Lines 11856 11853 -3
==========================================
+ Hits 6319 6334 +15
+ Misses 5537 5519 -18
Continue to review full report at Codecov.
|
Needs a cargo fmt. Can we add a test to tests/test_server.rs something like: #[actix_rt::test]
async fn test_normalize() {
let srv = test::start_with(test::config().h1(), || {
App::new()
.wrap(Compress::new(NormalizePath::new(TrailingSlash::Trim)))
.service(web::resource("/one").route(web::to(|| HttpResponse::Ok().finish())))
});
let mut response = srv
.get("/one/")
.send()
.await
.unwrap();
assert!(response.status().is_success());
} |
Just a changelog entry and we can get this released. |
PR Type
Bug Fix
PR Checklist
Overview
Wanted to try middleware::NormalizePath::new(TrailingSlash::Trim) introduced in 3.0.0 but I noticed that TrailingSlash enum is inside private package and It's not currently possible.