mirror of
https://github.com/fafhrd91/actix-web
synced 2025-07-04 18:06:23 +02:00
Compare commits
4 Commits
http-v0.2.
...
codegen-v0
Author | SHA1 | Date | |
---|---|---|---|
29a0fe76d5 | |||
7753b9da6d | |||
f1764bba43 | |||
c2d7db7e06 |
@ -15,6 +15,8 @@
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
* Fix Logger request time format, and use rfc3339. #867
|
||||||
|
|
||||||
* Clear http requests pool on app service drop #860
|
* Clear http requests pool on app service drop #860
|
||||||
|
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ actix-utils = "0.4.1"
|
|||||||
actix-router = "0.1.5"
|
actix-router = "0.1.5"
|
||||||
actix-rt = "0.2.2"
|
actix-rt = "0.2.2"
|
||||||
actix-web-codegen = "0.1.0"
|
actix-web-codegen = "0.1.0"
|
||||||
actix-http = "0.2.0"
|
actix-http = "0.2.2"
|
||||||
actix-server = "0.5.1"
|
actix-server = "0.5.1"
|
||||||
actix-server-config = "0.1.1"
|
actix-server-config = "0.1.1"
|
||||||
actix-threadpool = "0.1.0"
|
actix-threadpool = "0.1.0"
|
||||||
@ -100,7 +100,7 @@ openssl = { version="0.10", optional = true }
|
|||||||
rustls = { version = "0.15", optional = true }
|
rustls = { version = "0.15", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
actix-http = { version = "0.2.0", features=["ssl", "brotli", "flate2-zlib"] }
|
actix-http = { version = "0.2.2", features=["ssl", "brotli", "flate2-zlib"] }
|
||||||
actix-http-test = { version = "0.2.0", features=["ssl"] }
|
actix-http-test = { version = "0.2.0", features=["ssl"] }
|
||||||
actix-files = { version = "0.1.0" }
|
actix-files = { version = "0.1.0" }
|
||||||
rand = "0.6"
|
rand = "0.6"
|
||||||
|
@ -81,7 +81,7 @@ time = "0.1.42"
|
|||||||
tokio-tcp = "0.1.3"
|
tokio-tcp = "0.1.3"
|
||||||
tokio-timer = "0.2.8"
|
tokio-timer = "0.2.8"
|
||||||
tokio-current-thread = "0.1"
|
tokio-current-thread = "0.1"
|
||||||
trust-dns-resolver = { version="0.11.0", default-features = false }
|
trust-dns-resolver = { version="0.11.1", default-features = false }
|
||||||
|
|
||||||
# for secure cookie
|
# for secure cookie
|
||||||
ring = { version = "0.14.6", optional = true }
|
ring = { version = "0.14.6", optional = true }
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
|
## [1.0.0] - 2019-05-29
|
||||||
|
|
||||||
|
* Update actix-http and actix-web
|
||||||
|
|
||||||
## [0.1.0-alpha.3] - 2019-04-02
|
## [0.1.0-alpha.3] - 2019-04-02
|
||||||
|
|
||||||
* Update actix-http and actix-web
|
* Update actix-http and actix-web
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "actix-web-actors"
|
name = "actix-web-actors"
|
||||||
version = "1.0.0-beta.4"
|
version = "1.0.0"
|
||||||
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
||||||
description = "Actix actors support for actix web framework."
|
description = "Actix actors support for actix web framework."
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
@ -18,9 +18,9 @@ name = "actix_web_actors"
|
|||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix = "0.8.2"
|
actix = "0.8.3"
|
||||||
actix-web = "1.0.0-beta.5"
|
actix-web = "1.0.0-rc"
|
||||||
actix-http = "0.2.0"
|
actix-http = "0.2.2"
|
||||||
actix-codec = "0.1.2"
|
actix-codec = "0.1.2"
|
||||||
bytes = "0.4"
|
bytes = "0.4"
|
||||||
futures = "0.1.25"
|
futures = "0.1.25"
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
|
## [0.1.1] - 2019-06-01
|
||||||
|
|
||||||
|
* Add syn "extra-traits" feature
|
||||||
|
|
||||||
## [0.1.0] - 2019-05-18
|
## [0.1.0] - 2019-05-18
|
||||||
|
|
||||||
* Release
|
* Release
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "actix-web-codegen"
|
name = "actix-web-codegen"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
description = "Actix web proc macros"
|
description = "Actix web proc macros"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
||||||
@ -12,11 +12,11 @@ workspace = ".."
|
|||||||
proc-macro = true
|
proc-macro = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
quote = "0.6"
|
quote = "0.6.12"
|
||||||
syn = { version = "0.15", features = ["full", "parsing"] }
|
syn = { version = "0.15.34", features = ["full", "parsing", "extra-traits"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
actix-web = { version = "1.0.0-beta.5" }
|
actix-web = { version = "1.0.0-rc" }
|
||||||
actix-http = { version = "0.2.0", features=["ssl"] }
|
actix-http = { version = "0.2.2", features=["ssl"] }
|
||||||
actix-http-test = { version = "0.2.0", features=["ssl"] }
|
actix-http-test = { version = "0.2.0", features=["ssl"] }
|
||||||
futures = { version = "0.1" }
|
futures = { version = "0.1" }
|
||||||
|
1
actix-web-codegen/LICENSE-APACHE
Symbolic link
1
actix-web-codegen/LICENSE-APACHE
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../LICENSE-APACHE
|
1
actix-web-codegen/LICENSE-MIT
Symbolic link
1
actix-web-codegen/LICENSE-MIT
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../LICENSE-MIT
|
@ -53,7 +53,7 @@ use crate::HttpResponse;
|
|||||||
///
|
///
|
||||||
/// `%a` Remote IP-address (IP-address of proxy if using reverse proxy)
|
/// `%a` Remote IP-address (IP-address of proxy if using reverse proxy)
|
||||||
///
|
///
|
||||||
/// `%t` Time when the request was started to process
|
/// `%t` Time when the request was started to process (in rfc3339 format)
|
||||||
///
|
///
|
||||||
/// `%r` First line of request
|
/// `%r` First line of request
|
||||||
///
|
///
|
||||||
@ -417,10 +417,7 @@ impl FormatText {
|
|||||||
}
|
}
|
||||||
FormatText::UrlPath => *self = FormatText::Str(format!("{}", req.path())),
|
FormatText::UrlPath => *self = FormatText::Str(format!("{}", req.path())),
|
||||||
FormatText::RequestTime => {
|
FormatText::RequestTime => {
|
||||||
*self = FormatText::Str(format!(
|
*self = FormatText::Str(format!("{}", now.rfc3339()))
|
||||||
"{:?}",
|
|
||||||
now.strftime("[%d/%b/%Y:%H:%M:%S %z]").unwrap()
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
FormatText::RequestHeader(ref name) => {
|
FormatText::RequestHeader(ref name) => {
|
||||||
let s = if let Some(val) = req.headers().get(name) {
|
let s = if let Some(val) = req.headers().get(name) {
|
||||||
@ -547,4 +544,29 @@ mod tests {
|
|||||||
assert!(s.contains("200 1024"));
|
assert!(s.contains("200 1024"));
|
||||||
assert!(s.contains("ACTIX-WEB"));
|
assert!(s.contains("ACTIX-WEB"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_request_time_format() {
|
||||||
|
let mut format = Format::new("%t");
|
||||||
|
let req = TestRequest::default().to_srv_request();
|
||||||
|
|
||||||
|
let now = time::now();
|
||||||
|
for unit in &mut format.0 {
|
||||||
|
unit.render_request(now, &req);
|
||||||
|
}
|
||||||
|
|
||||||
|
let resp = HttpResponse::build(StatusCode::OK).force_close().finish();
|
||||||
|
for unit in &mut format.0 {
|
||||||
|
unit.render_response(&resp);
|
||||||
|
}
|
||||||
|
|
||||||
|
let render = |fmt: &mut Formatter| {
|
||||||
|
for unit in &format.0 {
|
||||||
|
unit.render(fmt, 1024, now)?;
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
};
|
||||||
|
let s = format!("{}", FormatDisplay(&render));
|
||||||
|
assert!(s.contains(&format!("{}", now.rfc3339())));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user