mirror of https://github.com/fafhrd91/actix-web
update changelog
This commit is contained in:
parent
d5bdafac74
commit
e6f1e01707
|
@ -11,8 +11,8 @@
|
|||
* Update `rust-tls` to `0.19`. [#1813]
|
||||
* Rename `Handler` to `HandlerService` and rename `Factory` to `Handler`. [#1852]
|
||||
* The default `TrailingSlash` is now `Trim`, in line with existing documentation. See migration
|
||||
guide for implications. [#????]
|
||||
* Rename `DefaultHeaders::{content_type => add_content_type}`. [#????]
|
||||
guide for implications. [#1875]
|
||||
* Rename `DefaultHeaders::{content_type => add_content_type}`. [#1875]
|
||||
* MSRV is now 1.46.0.
|
||||
|
||||
### Fixed
|
||||
|
@ -26,7 +26,7 @@
|
|||
[#1813]: https://github.com/actix/actix-web/pull/1813
|
||||
[#1852]: https://github.com/actix/actix-web/pull/1852
|
||||
[#1865]: https://github.com/actix/actix-web/pull/1865
|
||||
[#????]: https://github.com/actix/actix-web/pull/????
|
||||
[#1875]: https://github.com/actix/actix-web/pull/1875
|
||||
|
||||
|
||||
## 3.3.2 - 2020-12-01
|
||||
|
|
|
@ -18,8 +18,7 @@ async fn no_params() -> &'static str {
|
|||
|
||||
#[actix_web::main]
|
||||
async fn main() -> std::io::Result<()> {
|
||||
std::env::set_var("RUST_LOG", "actix_server=info,actix_web=info");
|
||||
env_logger::init();
|
||||
env_logger::init_from_env(env_logger::Env::new().default_filter_or("info"));
|
||||
|
||||
HttpServer::new(|| {
|
||||
App::new()
|
||||
|
|
|
@ -9,13 +9,13 @@ use std::{
|
|||
task::{Context, Poll},
|
||||
};
|
||||
|
||||
use actix_service::{Service, Transform};
|
||||
use futures_util::{
|
||||
future::{ready, Ready},
|
||||
ready,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
dev::{Service, Transform},
|
||||
http::{
|
||||
header::{HeaderName, HeaderValue, CONTENT_TYPE},
|
||||
Error as HttpError, HeaderMap,
|
||||
|
|
|
@ -48,9 +48,10 @@ impl Default for TrailingSlash {
|
|||
/// to [`new`](NormalizePath::new()).
|
||||
///
|
||||
/// # Default Behavior
|
||||
/// The default constructor chooses to append trailing slashes to the end of paths without them
|
||||
/// ([`TrailingSlash::Always`]), the effect is that route definitions should be defined with
|
||||
/// trailing slashes or else they will be inaccessible, or vice versa when using the trim behavior.
|
||||
/// The default constructor chooses to strip trailing slashes from the end of paths with them
|
||||
/// ([`TrailingSlash::Trim`]). The implication is that route definitions should be defined without
|
||||
/// trailing slashes or else they will be inaccessible (or vice versa when using the
|
||||
/// `TrailingSlash::Always` behavior), as shown in the example tests below.
|
||||
///
|
||||
/// # Usage
|
||||
/// ```rust
|
||||
|
@ -92,16 +93,6 @@ impl NormalizePath {
|
|||
pub fn new(trailing_slash_style: TrailingSlash) -> Self {
|
||||
NormalizePath(trailing_slash_style)
|
||||
}
|
||||
|
||||
/// Shortcut for new `NormalizePath::new(TrailingSlash::Trim)`.
|
||||
pub fn trim() -> Self {
|
||||
NormalizePath::new(TrailingSlash::Trim)
|
||||
}
|
||||
|
||||
/// Shortcut for new `NormalizePath::new(TrailingSlash::MergeOnly)`.
|
||||
pub fn merge_only() -> Self {
|
||||
NormalizePath::new(TrailingSlash::MergeOnly)
|
||||
}
|
||||
}
|
||||
|
||||
impl<S, B> Transform<S, ServiceRequest> for NormalizePath
|
||||
|
|
Loading…
Reference in New Issue