1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-07-16 22:55:47 +02:00

Compare commits

...

6 Commits

Author SHA1 Message Date
Rob Ede
76f6106f8f fix: wrap attribute codegen regression when using expression (#3119) 2023-08-29 21:27:36 +01:00
Rob Ede
39abe3ae5e docs: fix -http changelog 2023-08-29 01:57:19 +01:00
Rob Ede
e6636f1279 chore(actix-test): prepare release 0.1.2 2023-08-29 01:55:17 +01:00
Rob Ede
2b40033a9c chore(actix-web): prepare release 4.4.0 2023-08-29 01:54:40 +01:00
Rob Ede
d2c0d472e9 chore(awc): prepare release 3.2.0 2023-08-29 01:53:14 +01:00
Rob Ede
45fdc08788 chore(actix-http): prepare release 3.4.0 2023-08-29 01:51:54 +01:00
17 changed files with 52 additions and 27 deletions

View File

@@ -2,11 +2,13 @@
## Unreleased
## 3.4.0
### Added
- Add `rustls-0_20` crate feature.
- Add `{H1Service, H2Service, HttpService}::rustls_021()` and `HttpService::rustls_021_with_config()` service constructors.
- Add `body::to_body_limit()` function.
- Add `{h1::H1Service, h2::H2Service, HttpService}::rustls_021()` and `HttpService::rustls_021_with_config()` service constructors.
- Add `body::to_bytes_limited()` function.
- Add `body::BodyLimitExceeded` error type.
### Changed

View File

@@ -1,6 +1,6 @@
[package]
name = "actix-http"
version = "3.3.1"
version = "3.4.0"
authors = [
"Nikolay Kim <fafhrd91@gmail.com>",
"Rob Ede <robjtede@icloud.com>",

View File

@@ -3,11 +3,11 @@
> HTTP primitives for the Actix ecosystem.
[![crates.io](https://img.shields.io/crates/v/actix-http?label=latest)](https://crates.io/crates/actix-http)
[![Documentation](https://docs.rs/actix-http/badge.svg?version=3.3.1)](https://docs.rs/actix-http/3.3.1)
[![Documentation](https://docs.rs/actix-http/badge.svg?version=3.4.0)](https://docs.rs/actix-http/3.4.0)
![Version](https://img.shields.io/badge/rustc-1.68+-ab6000.svg)
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-http.svg)
<br />
[![dependency status](https://deps.rs/crate/actix-http/3.3.1/status.svg)](https://deps.rs/crate/actix-http/3.3.1)
[![dependency status](https://deps.rs/crate/actix-http/3.4.0/status.svg)](https://deps.rs/crate/actix-http/3.4.0)
[![Download](https://img.shields.io/crates/d/actix-http.svg)](https://crates.io/crates/actix-http)
[![Chat on Discord](https://img.shields.io/discord/771444961383153695?label=chat&logo=discord)](https://discord.gg/NWpN5mmg3x)

View File

@@ -2,6 +2,8 @@
## Unreleased
## 0.1.2
- Add `TestServerConfig::rustls_021()` method for Rustls v0.21 support behind new `rustls-0_21` crate feature.
- Add `TestServerConfig::workers()` method.
- Add `rustls-0_20` crate feature, which the existing `rustls` feature now aliases.

View File

@@ -1,6 +1,6 @@
[package]
name = "actix-test"
version = "0.1.1"
version = "0.1.2"
authors = [
"Nikolay Kim <fafhrd91@gmail.com>",
"Rob Ede <robjtede@icloud.com>",

View File

@@ -2,6 +2,10 @@
## Unreleased
## 4.2.2
- Fix regression when declaring `wrap` attribute using an expression.
## 4.2.1
- Update `syn` dependency to `2`.

View File

@@ -1,6 +1,6 @@
[package]
name = "actix-web-codegen"
version = "4.2.1"
version = "4.2.2"
description = "Routing and runtime macros for Actix Web"
homepage = "https://actix.rs"
repository = "https://github.com/actix/actix-web.git"

View File

@@ -3,11 +3,11 @@
> Routing and runtime macros for Actix Web.
[![crates.io](https://img.shields.io/crates/v/actix-web-codegen?label=latest)](https://crates.io/crates/actix-web-codegen)
[![Documentation](https://docs.rs/actix-web-codegen/badge.svg?version=4.2.1)](https://docs.rs/actix-web-codegen/4.2.1)
[![Documentation](https://docs.rs/actix-web-codegen/badge.svg?version=4.2.2)](https://docs.rs/actix-web-codegen/4.2.2)
![Version](https://img.shields.io/badge/rustc-1.68+-ab6000.svg)
![License](https://img.shields.io/crates/l/actix-web-codegen.svg)
<br />
[![dependency status](https://deps.rs/crate/actix-web-codegen/4.2.1/status.svg)](https://deps.rs/crate/actix-web-codegen/4.2.1)
[![dependency status](https://deps.rs/crate/actix-web-codegen/4.2.2/status.svg)](https://deps.rs/crate/actix-web-codegen/4.2.2)
[![Download](https://img.shields.io/crates/d/actix-web-codegen.svg)](https://crates.io/crates/actix-web-codegen)
[![Chat on Discord](https://img.shields.io/discord/771444961383153695?label=chat&logo=discord)](https://discord.gg/NWpN5mmg3x)

View File

@@ -224,7 +224,7 @@ struct Args {
path: syn::LitStr,
resource_name: Option<syn::LitStr>,
guards: Vec<Path>,
wrappers: Vec<syn::Type>,
wrappers: Vec<syn::Expr>,
methods: HashSet<MethodTypeExt>,
}
@@ -251,7 +251,7 @@ impl Args {
} else {
return Err(syn::Error::new_spanned(
nv.value,
"Attribute name expects literal string!",
"Attribute name expects literal string",
));
}
} else if nv.path.is_ident("guard") {
@@ -264,7 +264,7 @@ impl Args {
} else {
return Err(syn::Error::new_spanned(
nv.value,
"Attribute guard expects literal string!",
"Attribute guard expects literal string",
));
}
} else if nv.path.is_ident("wrap") {
@@ -283,9 +283,9 @@ impl Args {
} else if nv.path.is_ident("method") {
if !is_route_macro {
return Err(syn::Error::new_spanned(
&nv,
"HTTP method forbidden here. To handle multiple methods, use `route` instead",
));
&nv,
"HTTP method forbidden here; to handle multiple methods, use `route` instead",
));
} else if let syn::Expr::Lit(syn::ExprLit {
lit: syn::Lit::Str(lit),
..
@@ -300,13 +300,13 @@ impl Args {
} else {
return Err(syn::Error::new_spanned(
nv.value,
"Attribute method expects literal string!",
"Attribute method expects literal string",
));
}
} else {
return Err(syn::Error::new_spanned(
nv.path,
"Unknown attribute key is specified. Allowed: guard, method and wrap",
"Unknown attribute key is specified; allowed: guard, method and wrap",
));
}
}

View File

@@ -212,6 +212,19 @@ async fn get_wrap(_: web::Path<String>) -> impl Responder {
HttpResponse::Ok()
}
/// Using expression, not just path to type, in wrap attribute.
///
/// Regression from <https://github.com/actix/actix-web/issues/3118>.
#[route(
"/catalog",
method = "GET",
method = "HEAD",
wrap = "actix_web::middleware::Compress::default()"
)]
async fn get_catalog() -> impl Responder {
HttpResponse::Ok().body("123123123")
}
#[actix_rt::test]
async fn test_params() {
let srv = actix_test::start(|| {

View File

@@ -38,7 +38,7 @@ error: Multiple paths specified! There should be only one.
|
= note: this error originates in the attribute macro `delete` (in Nightly builds, run with -Z macro-backtrace for more info)
error: HTTP method forbidden here. To handle multiple methods, use `route` instead
error: HTTP method forbidden here; to handle multiple methods, use `route` instead
--> $DIR/simple-fail.rs:25:19
|
25 | #[delete("/five", method="GET")]

View File

@@ -2,6 +2,8 @@
## Unreleased
## 4.4.0
### Added
- Add `HttpServer::{bind, listen}_auto_h2c()` methods behind new `http2` crate feature.

View File

@@ -1,6 +1,6 @@
[package]
name = "actix-web"
version = "4.3.1"
version = "4.4.0"
authors = [
"Nikolay Kim <fafhrd91@gmail.com>",
"Rob Ede <robjtede@icloud.com>",
@@ -75,7 +75,7 @@ actix-service = "2"
actix-utils = "3"
actix-tls = { version = "3.1", default-features = false, optional = true }
actix-http = { version = "3.3", features = ["ws"] }
actix-http = { version = "3.4", features = ["ws"] }
actix-router = "0.5"
actix-web-codegen = { version = "4.2", optional = true }

View File

@@ -8,10 +8,10 @@
<!-- prettier-ignore-start -->
[![crates.io](https://img.shields.io/crates/v/actix-web?label=latest)](https://crates.io/crates/actix-web)
[![Documentation](https://docs.rs/actix-web/badge.svg?version=4.3.1)](https://docs.rs/actix-web/4.3.1)
[![Documentation](https://docs.rs/actix-web/badge.svg?version=4.4.0)](https://docs.rs/actix-web/4.4.0)
![MSRV](https://img.shields.io/badge/rustc-1.68+-ab6000.svg)
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-web.svg)
[![Dependency Status](https://deps.rs/crate/actix-web/4.3.1/status.svg)](https://deps.rs/crate/actix-web/4.3.1)
[![Dependency Status](https://deps.rs/crate/actix-web/4.4.0/status.svg)](https://deps.rs/crate/actix-web/4.4.0)
<br />
[![CI](https://github.com/actix/actix-web/actions/workflows/ci.yml/badge.svg)](https://github.com/actix/actix-web/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/actix/actix-web/branch/master/graph/badge.svg)](https://codecov.io/gh/actix/actix-web)

View File

@@ -2,6 +2,8 @@
## Unreleased
## 3.2.0
- Add `awc::Connector::rustls_021()` method for Rustls v0.21 support behind new `rustls-0_21` crate feature.
- Add `rustls-0_20` crate feature, which the existing `rustls` feature now aliases.
- Minimum supported Rust version (MSRV) is now 1.68 due to transitive `time` dependency.

View File

@@ -1,6 +1,6 @@
[package]
name = "awc"
version = "3.1.1"
version = "3.2.0"
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
description = "Async HTTP and WebSocket client library"
keywords = ["actix", "http", "framework", "async", "web"]
@@ -61,7 +61,7 @@ dangerous-h2c = []
[dependencies]
actix-codec = "0.5"
actix-service = "2"
actix-http = { version = "3.3", features = ["http2", "ws"] }
actix-http = { version = "3.4", features = ["http2", "ws"] }
actix-rt = { version = "2.1", default-features = false }
actix-tls = { version = "3.1", features = ["connect", "uri"] }
actix-utils = "3"
@@ -94,7 +94,7 @@ tls-rustls-0_21 = { package = "rustls", version = "0.21", optional = true, featu
trust-dns-resolver = { version = "0.22", optional = true }
[dev-dependencies]
actix-http = { version = "3", features = ["openssl"] }
actix-http = { version = "3.4", features = ["openssl"] }
actix-http-test = { version = "3", features = ["openssl"] }
actix-server = "2"
actix-test = { version = "0.1", features = ["openssl", "rustls-0_21"] }

View File

@@ -3,9 +3,9 @@
> Async HTTP and WebSocket client library.
[![crates.io](https://img.shields.io/crates/v/awc?label=latest)](https://crates.io/crates/awc)
[![Documentation](https://docs.rs/awc/badge.svg?version=3.1.1)](https://docs.rs/awc/3.1.1)
[![Documentation](https://docs.rs/awc/badge.svg?version=3.2.0)](https://docs.rs/awc/3.2.0)
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/awc)
[![Dependency Status](https://deps.rs/crate/awc/3.1.1/status.svg)](https://deps.rs/crate/awc/3.1.1)
[![Dependency Status](https://deps.rs/crate/awc/3.2.0/status.svg)](https://deps.rs/crate/awc/3.2.0)
[![Chat on Discord](https://img.shields.io/discord/771444961383153695?label=chat&logo=discord)](https://discord.gg/NWpN5mmg3x)
## Documentation & Resources