mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-10 16:51:17 +02:00
Compare commits
10 Commits
awc-v3.0.1
...
http-v3.2.
Author | SHA1 | Date | |
---|---|---|---|
|
7767cf3071 | ||
|
b59a96d9d7 | ||
|
037740bf62 | ||
|
386258c285 | ||
|
99bf774e94 | ||
|
35b0fd1a85 | ||
|
0b5b4dcbf3 | ||
|
c993055fc8 | ||
|
679f61cf37 | ||
|
056de320f0 |
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
- { name: macOS, os: macos-latest, triple: x86_64-apple-darwin }
|
||||
- { name: Windows, os: windows-2022, triple: x86_64-pc-windows-msvc }
|
||||
version:
|
||||
- 1.57.0 # MSRV
|
||||
- 1.59.0 # MSRV
|
||||
- stable
|
||||
|
||||
name: ${{ matrix.target.name }} / ${{ matrix.version }}
|
||||
|
7
.github/workflows/upload-doc.yml
vendored
7
.github/workflows/upload-doc.yml
vendored
@@ -28,8 +28,7 @@ jobs:
|
||||
run: echo '<meta http-equiv="refresh" content="0;url=actix_web/index.html">' > target/doc/index.html
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
||||
uses: JamesIves/github-pages-deploy-action@v4.4.0
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BRANCH: gh-pages
|
||||
FOLDER: target/doc
|
||||
folder: target/doc
|
||||
single-commit: true
|
||||
|
@@ -1,6 +1,7 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2022-xx-xx
|
||||
- Minimum supported Rust version (MSRV) is now 1.59 due to transitive `time` dependency.
|
||||
|
||||
|
||||
## 0.6.2 - 2022-07-23
|
||||
|
@@ -27,7 +27,6 @@ actix-service = "2"
|
||||
actix-utils = "3"
|
||||
actix-web = { version = "4", default-features = false }
|
||||
|
||||
askama_escape = "0.10"
|
||||
bitflags = "1"
|
||||
bytes = "1"
|
||||
derive_more = "0.99.5"
|
||||
@@ -38,6 +37,7 @@ mime = "0.3"
|
||||
mime_guess = "2.0.1"
|
||||
percent-encoding = "2.1"
|
||||
pin-project-lite = "0.2.7"
|
||||
v_htmlescape= "0.15"
|
||||
|
||||
# experimental-io-uring
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
[](https://crates.io/crates/actix-files)
|
||||
[](https://docs.rs/actix-files/0.6.2)
|
||||

|
||||

|
||||

|
||||
<br />
|
||||
[](https://deps.rs/crate/actix-files/0.6.2)
|
||||
|
@@ -1,8 +1,8 @@
|
||||
use std::{fmt::Write, fs::DirEntry, io, path::Path, path::PathBuf};
|
||||
|
||||
use actix_web::{dev::ServiceResponse, HttpRequest, HttpResponse};
|
||||
use askama_escape::{escape as escape_html_entity, Html};
|
||||
use percent_encoding::{utf8_percent_encode, CONTROLS};
|
||||
use v_htmlescape::escape as escape_html_entity;
|
||||
|
||||
/// A directory; responds with the generated directory listing.
|
||||
#[derive(Debug)]
|
||||
@@ -59,7 +59,7 @@ macro_rules! encode_file_url {
|
||||
/// ```
|
||||
macro_rules! encode_file_name {
|
||||
($entry:ident) => {
|
||||
escape_html_entity(&$entry.file_name().to_string_lossy(), Html)
|
||||
escape_html_entity(&$entry.file_name().to_string_lossy())
|
||||
};
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2022-xx-xx
|
||||
- Minimum supported Rust version (MSRV) is now 1.59.
|
||||
|
||||
|
||||
## 3.0.0 - 2022-07-24
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
[](https://crates.io/crates/actix-http-test)
|
||||
[](https://docs.rs/actix-http-test/3.0.0)
|
||||

|
||||

|
||||

|
||||
<br>
|
||||
[](https://deps.rs/crate/actix-http-test/3.0.0)
|
||||
|
@@ -1,6 +1,12 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2022-xx-xx
|
||||
|
||||
|
||||
## 3.2.2 - 2022-09-11
|
||||
### Changed
|
||||
- Minimum supported Rust version (MSRV) is now 1.59 due to transitive `time` dependency.
|
||||
|
||||
### Fixed
|
||||
- Avoid possibility of dispatcher getting stuck while back-pressuring I/O. [#2369]
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "actix-http"
|
||||
version = "3.2.1"
|
||||
version = "3.2.2"
|
||||
authors = [
|
||||
"Nikolay Kim <fafhrd91@gmail.com>",
|
||||
"Rob Ede <robjtede@icloud.com>",
|
||||
|
@@ -3,11 +3,11 @@
|
||||
> HTTP primitives for the Actix ecosystem.
|
||||
|
||||
[](https://crates.io/crates/actix-http)
|
||||
[](https://docs.rs/actix-http/3.2.1)
|
||||

|
||||
[](https://docs.rs/actix-http/3.2.2)
|
||||

|
||||

|
||||
<br />
|
||||
[](https://deps.rs/crate/actix-http/3.2.1)
|
||||
[](https://deps.rs/crate/actix-http/3.2.2)
|
||||
[](https://crates.io/crates/actix-http)
|
||||
[](https://discord.gg/NWpN5mmg3x)
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2022-xx-xx
|
||||
- Minimum supported Rust version (MSRV) is now 1.57 due to transitive `time` dependency.
|
||||
- Minimum supported Rust version (MSRV) is now 1.59 due to transitive `time` dependency.
|
||||
|
||||
|
||||
## 0.4.0 - 2022-02-25
|
||||
|
@@ -28,7 +28,7 @@ twoway = "0.2"
|
||||
|
||||
[dev-dependencies]
|
||||
actix-rt = "2.2"
|
||||
actix-http = "3.0.0"
|
||||
actix-http = "3"
|
||||
futures-util = { version = "0.3.7", default-features = false, features = ["alloc"] }
|
||||
tokio = { version = "1.8.4", features = ["sync"] }
|
||||
tokio-stream = "0.1"
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
[](https://crates.io/crates/actix-multipart)
|
||||
[](https://docs.rs/actix-multipart/0.4.0)
|
||||

|
||||

|
||||

|
||||
<br />
|
||||
[](https://deps.rs/crate/actix-multipart/0.4.0)
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2022-xx-xx
|
||||
- Minimum supported Rust version (MSRV) is now 1.57 due to transitive `time` dependency.
|
||||
- Minimum supported Rust version (MSRV) is now 1.59 due to transitive `time` dependency.
|
||||
|
||||
|
||||
## 0.5.0 - 2022-02-22
|
||||
|
@@ -1,6 +1,7 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2022-xx-xx
|
||||
- Minimum supported Rust version (MSRV) is now 1.59 due to transitive `time` dependency.
|
||||
|
||||
|
||||
## 0.1.0 - 2022-07-24
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
[](https://crates.io/crates/actix-web-actors)
|
||||
[](https://docs.rs/actix-web-actors/4.1.0)
|
||||

|
||||

|
||||

|
||||
<br />
|
||||
[](https://deps.rs/crate/actix-web-actors/4.1.0)
|
||||
|
@@ -1,8 +1,11 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2022-xx-xx
|
||||
|
||||
|
||||
## 4.1.0 - 2022-09-11
|
||||
- Add `#[routes]` macro to support multiple paths for one handler. [#2718]
|
||||
- Minimum supported Rust version (MSRV) is now 1.57 due to transitive `time` dependency.
|
||||
- Minimum supported Rust version (MSRV) is now 1.59 due to transitive `time` dependency.
|
||||
|
||||
[#2718]: https://github.com/actix/actix-web/pull/2718
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "actix-web-codegen"
|
||||
version = "4.0.1"
|
||||
version = "4.1.0"
|
||||
description = "Routing and runtime macros for Actix Web"
|
||||
homepage = "https://actix.rs"
|
||||
repository = "https://github.com/actix/actix-web.git"
|
||||
@@ -24,8 +24,8 @@ syn = { version = "1", features = ["full", "extra-traits"] }
|
||||
actix-macros = "0.2.3"
|
||||
actix-rt = "2.2"
|
||||
actix-test = "0.1"
|
||||
actix-utils = "3.0.0"
|
||||
actix-web = "4.0.0"
|
||||
actix-utils = "3"
|
||||
actix-web = "4"
|
||||
|
||||
futures-core = { version = "0.3.7", default-features = false, features = ["alloc"] }
|
||||
trybuild = "1"
|
||||
|
@@ -3,11 +3,11 @@
|
||||
> Routing and runtime macros for Actix Web.
|
||||
|
||||
[](https://crates.io/crates/actix-web-codegen)
|
||||
[](https://docs.rs/actix-web-codegen/4.0.1)
|
||||

|
||||
[](https://docs.rs/actix-web-codegen/4.1.0)
|
||||

|
||||

|
||||
<br />
|
||||
[](https://deps.rs/crate/actix-web-codegen/4.0.1)
|
||||
[](https://deps.rs/crate/actix-web-codegen/4.1.0)
|
||||
[](https://crates.io/crates/actix-web-codegen)
|
||||
[](https://discord.gg/NWpN5mmg3x)
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#[rustversion::stable(1.57)] // MSRV
|
||||
#[rustversion::stable(1.59)] // MSRV
|
||||
#[test]
|
||||
fn compile_macros() {
|
||||
let t = trybuild::TestCases::new();
|
||||
|
@@ -4,10 +4,16 @@ error: HTTP method defined more than once: `GET`
|
||||
3 | #[route("/", method="GET", method="GET")]
|
||||
| ^^^^^
|
||||
|
||||
error[E0277]: the trait bound `fn() -> impl std::future::Future {index}: HttpServiceFactory` is not satisfied
|
||||
--> tests/trybuild/route-duplicate-method-fail.rs:12:55
|
||||
|
|
||||
12 | let srv = actix_test::start(|| App::new().service(index));
|
||||
| ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for `fn() -> impl std::future::Future {index}`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
error[E0277]: the trait bound `fn() -> impl std::future::Future<Output = String> {index}: HttpServiceFactory` is not satisfied
|
||||
--> tests/trybuild/route-duplicate-method-fail.rs:12:55
|
||||
|
|
||||
12 | let srv = actix_test::start(|| App::new().service(index));
|
||||
| ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for `fn() -> impl std::future::Future<Output = String> {index}`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
note: required by a bound in `App::<T>::service`
|
||||
--> $WORKSPACE/actix-web/src/app.rs
|
||||
|
|
||||
| F: HttpServiceFactory + 'static,
|
||||
| ^^^^^^^^^^^^^^^^^^ required by this bound in `App::<T>::service`
|
||||
|
@@ -6,10 +6,16 @@ error: The #[route(..)] macro requires at least one `method` attribute
|
||||
|
|
||||
= note: this error originates in the attribute macro `route` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0277]: the trait bound `fn() -> impl std::future::Future {index}: HttpServiceFactory` is not satisfied
|
||||
--> tests/trybuild/route-missing-method-fail.rs:12:55
|
||||
|
|
||||
12 | let srv = actix_test::start(|| App::new().service(index));
|
||||
| ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for `fn() -> impl std::future::Future {index}`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
error[E0277]: the trait bound `fn() -> impl std::future::Future<Output = String> {index}: HttpServiceFactory` is not satisfied
|
||||
--> tests/trybuild/route-missing-method-fail.rs:12:55
|
||||
|
|
||||
12 | let srv = actix_test::start(|| App::new().service(index));
|
||||
| ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for `fn() -> impl std::future::Future<Output = String> {index}`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
note: required by a bound in `App::<T>::service`
|
||||
--> $WORKSPACE/actix-web/src/app.rs
|
||||
|
|
||||
| F: HttpServiceFactory + 'static,
|
||||
| ^^^^^^^^^^^^^^^^^^ required by this bound in `App::<T>::service`
|
||||
|
@@ -4,10 +4,16 @@ error: Unexpected HTTP method: `UNEXPECTED`
|
||||
3 | #[route("/", method="UNEXPECTED")]
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `fn() -> impl std::future::Future {index}: HttpServiceFactory` is not satisfied
|
||||
--> tests/trybuild/route-unexpected-method-fail.rs:12:55
|
||||
|
|
||||
12 | let srv = actix_test::start(|| App::new().service(index));
|
||||
| ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for `fn() -> impl std::future::Future {index}`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
error[E0277]: the trait bound `fn() -> impl std::future::Future<Output = String> {index}: HttpServiceFactory` is not satisfied
|
||||
--> tests/trybuild/route-unexpected-method-fail.rs:12:55
|
||||
|
|
||||
12 | let srv = actix_test::start(|| App::new().service(index));
|
||||
| ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for `fn() -> impl std::future::Future<Output = String> {index}`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
note: required by a bound in `App::<T>::service`
|
||||
--> $WORKSPACE/actix-web/src/app.rs
|
||||
|
|
||||
| F: HttpServiceFactory + 'static,
|
||||
| ^^^^^^^^^^^^^^^^^^ required by this bound in `App::<T>::service`
|
||||
|
@@ -12,10 +12,16 @@ error: Invalid input for macro
|
||||
4 | #[get]
|
||||
| ^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `fn() -> impl std::future::Future {index}: HttpServiceFactory` is not satisfied
|
||||
--> tests/trybuild/routes-missing-args-fail.rs:13:55
|
||||
|
|
||||
13 | let srv = actix_test::start(|| App::new().service(index));
|
||||
| ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for `fn() -> impl std::future::Future {index}`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
error[E0277]: the trait bound `fn() -> impl std::future::Future<Output = String> {index}: HttpServiceFactory` is not satisfied
|
||||
--> tests/trybuild/routes-missing-args-fail.rs:13:55
|
||||
|
|
||||
13 | let srv = actix_test::start(|| App::new().service(index));
|
||||
| ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for `fn() -> impl std::future::Future<Output = String> {index}`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
note: required by a bound in `App::<T>::service`
|
||||
--> $WORKSPACE/actix-web/src/app.rs
|
||||
|
|
||||
| F: HttpServiceFactory + 'static,
|
||||
| ^^^^^^^^^^^^^^^^^^ required by this bound in `App::<T>::service`
|
||||
|
@@ -6,10 +6,16 @@ error: The #[routes] macro requires at least one `#[<method>(..)]` attribute.
|
||||
|
|
||||
= note: this error originates in the attribute macro `routes` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0277]: the trait bound `fn() -> impl std::future::Future {index}: HttpServiceFactory` is not satisfied
|
||||
--> tests/trybuild/routes-missing-method-fail.rs:12:55
|
||||
|
|
||||
12 | let srv = actix_test::start(|| App::new().service(index));
|
||||
| ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for `fn() -> impl std::future::Future {index}`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
error[E0277]: the trait bound `fn() -> impl std::future::Future<Output = String> {index}: HttpServiceFactory` is not satisfied
|
||||
--> tests/trybuild/routes-missing-method-fail.rs:12:55
|
||||
|
|
||||
12 | let srv = actix_test::start(|| App::new().service(index));
|
||||
| ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for `fn() -> impl std::future::Future<Output = String> {index}`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
note: required by a bound in `App::<T>::service`
|
||||
--> $WORKSPACE/actix-web/src/app.rs
|
||||
|
|
||||
| F: HttpServiceFactory + 'static,
|
||||
| ^^^^^^^^^^^^^^^^^^ required by this bound in `App::<T>::service`
|
||||
|
@@ -1,13 +1,16 @@
|
||||
# Changelog
|
||||
|
||||
## Unreleased - 2022-xx-xx
|
||||
|
||||
|
||||
## 4.2.0 - 2022-09-11
|
||||
### Added
|
||||
- Add `#[routes]` macro to support multiple paths for one handler. [#2718]
|
||||
- Add `ServiceRequest::{parts, request}()` getter methods. [#2786]
|
||||
- Add configuration options for TLS handshake timeout via `HttpServer::{rustls, openssl}_with_config` methods. [#2752]
|
||||
|
||||
### Changed
|
||||
- Minimum supported Rust version (MSRV) is now 1.57 due to transitive `time` dependency.
|
||||
- Minimum supported Rust version (MSRV) is now 1.59 due to transitive `time` dependency.
|
||||
|
||||
[#2718]: https://github.com/actix/actix-web/pull/2718
|
||||
[#2752]: https://github.com/actix/actix-web/pull/2752
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "actix-web"
|
||||
version = "4.1.0"
|
||||
version = "4.2.0"
|
||||
authors = [
|
||||
"Nikolay Kim <fafhrd91@gmail.com>",
|
||||
"Rob Ede <robjtede@icloud.com>",
|
||||
@@ -73,7 +73,7 @@ actix-tls = { version = "3", default-features = false, optional = true }
|
||||
|
||||
actix-http = { version = "3", features = ["http2", "ws"] }
|
||||
actix-router = "0.5"
|
||||
actix-web-codegen = { version = "4", optional = true }
|
||||
actix-web-codegen = { version = "4.1", optional = true }
|
||||
|
||||
ahash = "0.7"
|
||||
bytes = "1"
|
||||
|
@@ -6,10 +6,10 @@
|
||||
<p>
|
||||
|
||||
[](https://crates.io/crates/actix-web)
|
||||
[](https://docs.rs/actix-web/4.1.0)
|
||||

|
||||
[](https://docs.rs/actix-web/4.2.0)
|
||||

|
||||

|
||||
[](https://deps.rs/crate/actix-web/4.1.0)
|
||||
[](https://deps.rs/crate/actix-web/4.2.0)
|
||||
<br />
|
||||
[](https://github.com/actix/actix-web/actions/workflows/ci.yml)
|
||||
[](https://codecov.io/gh/actix/actix-web)
|
||||
@@ -33,7 +33,7 @@
|
||||
- SSL support using OpenSSL or Rustls
|
||||
- Middlewares ([Logger, Session, CORS, etc](https://actix.rs/docs/middleware/))
|
||||
- Integrates with the [`awc` HTTP client](https://docs.rs/awc/)
|
||||
- Runs on stable Rust 1.57+
|
||||
- Runs on stable Rust 1.59+
|
||||
|
||||
## Documentation
|
||||
|
||||
|
@@ -40,7 +40,7 @@ type Guards = Vec<Box<dyn Guard>>;
|
||||
/// use actix_web::{web, App, HttpResponse};
|
||||
///
|
||||
/// let app = App::new().service(
|
||||
/// web::scope("/{project_id}/")
|
||||
/// web::scope("/{project_id}")
|
||||
/// .service(web::resource("/path1").to(|| async { "OK" }))
|
||||
/// .service(web::resource("/path2").route(web::get().to(|| HttpResponse::Ok())))
|
||||
/// .service(web::resource("/path3").route(web::head().to(HttpResponse::MethodNotAllowed)))
|
||||
|
@@ -172,7 +172,7 @@ where
|
||||
///
|
||||
/// One thread pool is set up **per worker**; not shared across workers.
|
||||
///
|
||||
/// By default set to 512 / workers.
|
||||
/// By default set to 512 divided by the number of workers.
|
||||
pub fn worker_max_blocking_threads(mut self, num: usize) -> Self {
|
||||
self.builder = self.builder.worker_max_blocking_threads(num);
|
||||
self
|
||||
|
@@ -1,6 +1,8 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2022-xx-xx
|
||||
### Changed
|
||||
- Minimum supported Rust version (MSRV) is now 1.59 due to transitive `time` dependency.
|
||||
|
||||
|
||||
## 3.0.1 - 2022-08-25
|
||||
|
@@ -1 +1 @@
|
||||
msrv = "1.57"
|
||||
msrv = "1.59"
|
||||
|
@@ -45,6 +45,8 @@ unreleased_for() {
|
||||
cat "$CHANGE_CHUNK_FILE"
|
||||
}
|
||||
|
||||
for f in $(fd --absolute-path 'CHANGE\w+.md'); do
|
||||
unreleased_for $(dirname $f)
|
||||
files=$(fd --threads=1 --min-depth=2 --absolute-path 'CHANGE\w+.md')
|
||||
|
||||
for f in $files; do
|
||||
unreleased_for $(dirname $f) || true
|
||||
done
|
||||
|
Reference in New Issue
Block a user