Commit Graph

4135 Commits

Author SHA1 Message Date
Jens Reimann 1c703ac1d4 Allow using `Option<Middleware>` to enable/disable a middleware
Currently, there is `Condition`, which accepts a boolean
(to enable/disable) and an instance to the actual middleware.
The downside of that is, that such a middleware needs to be constructed
in any case. Even if the middleware is used or not.

However, the middleware is not used when it is disabled. Only the type
seems required. So this PR adds a `from_option` function, which allows
passing in an `Option` instead of boolean and instance. If the option
"is some" it is enabled. Otherwise, not.
2022-06-29 16:49:58 +02:00
Ulf Lilleengen 0dba6310c6
Expose option for setting TLS handshake timeout (#2752)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2022-06-27 02:57:21 +00:00
Rob Ede f7d7d92984
address clippy lints 2022-06-27 03:12:36 +01:00
nerix 3d6ea7fe9b
Improve documentation for `actix-web-actors` (#2788) 2022-06-26 16:45:02 +00:00
PeterPierinakos 8dbf7da89f
Fix common grammar mistakes and add small documentation for AppConfig's Default implementation (#2793) 2022-06-25 14:01:06 +00:00
oatoam de92b3be2e
fix unrecoverable Err(Overflow) in websocket frame parser (#2790) 2022-06-24 03:46:17 +00:00
e-rhodes 5d0e8138ee
Add getters for `&ServiceRequest` (#2786) 2022-06-22 21:02:03 +01:00
Yuki Okushi 6b7196225e
Bump up MSRV to 1.57 (#2789) 2022-06-22 12:08:06 +01:00
Isabel Atkinson 265fa0d050
Add link to MongoDB example in README (#2783) 2022-06-15 22:38:10 +01:00
Yuki Okushi 062127a210
Revert "actix-http: Pull actix-web dev-dep from Git repo"
This reverts commit 3926416580.
2022-06-12 00:55:06 +09:00
Yuki Okushi 3926416580
actix-http: Pull actix-web dev-dep from Git repo
The published version of actix-web depends on a buggy version of zstd crate,
temporarily use actix-web on git repo to avoid the build failure.

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-06-12 00:48:08 +09:00
Rob Ede 43671ae4aa
release 4.1 group (#2781) 2022-06-12 00:15:43 +09:00
Rob Ede 264a703d94
revert broken fix in #2624 (#2779)
* revert broken fix in #2624

* update changelog
2022-06-11 13:43:13 +01:00
Rob Ede 498fb954b3
migrate from deprecated sha-1 to sha1 (#2780)
closes #2778
2022-06-11 04:53:58 +01:00
Rob Ede 2253eae2bb
update msrv to 1.56 (#2777)
* update msrv to 1.56

* remove transitive dashmap dependency

closes #2747
2022-06-11 04:03:26 +01:00
JY Choi 8e76a1c775
Allow a path as a guard in route handler macro (#2771)
* Allow a path as a guard in route handler macro

* Update CHANGES.md

Co-authored-by: Rob Ede <robjtede@icloud.com>
2022-06-06 18:53:23 +01:00
Sabrina Jewson dce57a79c9
Implement `ResponseError` for `Infallible` (#2769) 2022-05-30 20:52:48 +01:00
cui fliter 6a5b370206
fix some typos (#2744)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2022-04-24 22:01:20 +00:00
Rob Ede b1c85ba85b
Add `ServiceConfig::default_service` (#2743)
* Add `ServiceConfig::default_service`

based on https://github.com/actix/actix-web/pull/2338

* update changelog
2022-04-23 22:11:45 +01:00
Matt Fellenz 9aab911600
Improve documentation for FromRequest::Future (#2734)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2022-04-23 20:57:11 +00:00
Rob Ede 017e40f733
update optional extractor impl docs 2022-04-23 21:02:24 +01:00
Rob Ede 45592b37b6
add `Route::wrap` (#2725)
* add `Route::wrap`

* add tests

* fix clippy

* fix doctests
2022-04-23 21:01:55 +01:00
Rob Ede 8abcb94512
fix tokio-uring version 2022-04-23 14:37:03 +01:00
Rob Ede f2cacc4c9d
clear conn_data on HttpRequest drop (#2742)
* clear conn_data on HttpRequest drop

fixes #2740

* update changelog

* fix doc test
2022-04-23 13:35:41 +01:00
Rob Ede 56b9c0d08e
remove payload unwindsafe impl assert 2022-04-23 12:31:32 +01:00
Luca Palmieri de9e41484a
Add `ServiceRequest::extract` (#2647)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2022-04-02 19:46:26 +01:00
Rob Ede 2fed978597
remove -http TestRequest doc test 2022-03-28 22:44:32 +01:00
Ali MJ Al-Nasrawy 40048a5811
rework actix_router::Quoter (#2709)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2022-03-28 20:58:35 +00:00
Rob Ede e942d3e3b1
update migration guide 2022-03-26 13:26:12 +00:00
mellowagain 09cffc093c
Bump zstd to 0.11 (#2694)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2022-03-22 15:30:06 +00:00
nikstur c58f287044
Removed random superfluous whitespace (#2705) 2022-03-20 21:36:19 +00:00
Rob Ede 7b27493e4c
move coverage to own workflow 2022-03-10 16:17:49 +00:00
Rob Ede 478b33b8a3
remove nightly io-uring job 2022-03-10 16:00:15 +00:00
Rob Ede 592b40f914
move io-uring tests to own job 2022-03-10 15:03:55 +00:00
Rob Ede fe5279c77a
use tracing in actix-router 2022-03-10 03:14:14 +00:00
Rob Ede 80d222aa78
use tracing in actix-http 2022-03-10 03:12:29 +00:00
Rob Ede a03a2a0076
deprecate `NamedFile::set_status_code` 2022-03-10 02:54:06 +00:00
Rob Ede 745e738955
fix negative impl assertion on 1.60+
see https://github.com/rust-lang/rust/issues/94791
2022-03-10 02:36:57 +00:00
Rob Ede 1fd90f0b10
Implement getters for named file fields (#2689)
Co-authored-by: Janis Goldschmidt <github@aberrat.io>
2022-03-10 01:29:26 +00:00
Rob Ede a35804b89f
update files tokio-uring to 0.3 2022-03-10 01:05:03 +00:00
Rob Ede 5611b98c0d
prepare actix-http release 3.0.4 2022-03-09 18:13:39 +00:00
Rob Ede dce9438518
document with ws feature 2022-03-09 18:11:12 +00:00
Dylan DPC be986d96b3
bump `regex` requirement to `1.5.5` due to security advisory (#2687) 2022-03-08 17:42:42 +00:00
Rob Ede 8ddb24b49b
prepare awc release 3.0.0 (#2684) 2022-03-08 16:51:40 +00:00
Rob Ede 87f627cd5d
improve servicerequest docs 2022-03-07 16:48:04 +00:00
Rob Ede 03456b8a33
update actix-web-in-http example 2022-03-05 23:43:31 +00:00
Rob Ede 8c2fad3164
align hello-world examples 2022-03-05 23:15:33 +00:00
Rob Ede 62fbd225bc
prepare actix-http release 3.0.2 2022-03-05 22:26:19 +00:00
Santiago 0fa4d999d9
fix(actix-http): encode correctly camel case header with n+2 hyphens (#2683)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2022-03-05 22:24:21 +00:00
Rob Ede da4c849f62
prepare actix-http release 3.0.1 2022-03-04 03:16:02 +00:00