1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-05-19 16:58:14 +00:00
Commit graph

74 commits

Author SHA1 Message Date
Rob Ede 59115bca49
chore(actix-web): prepare release 4.6.0 2024-05-19 10:15:48 +01:00
asonix 2e63ff5928
actix-web: Add rustls 0.23 (#3363)
* Fix type confusion in some scenarios

When the feature for rustls 0.22 is enabled, and rustls 0.23 is also
present in a project, there suddently exist multiple paths for errors
when building middleware chains due to the use of two consecutive `?`
operators without specifying the intermediate error type.

This commit addresses the issue by removing the first `?`, so that the
first error type will always be known, and the second `?` always has a
well defined implementation.

* Add CHANGES entry about type confusion

* actix-http: add rustls 0.23 support

* actix-http: update ws example, tests for rustls 0.23

* actix-http: add rustls 0.23 to changelog

* Update comments to mention 0.23 instead of 0.22

* awc: add rustls 0.23 support

This also fixes certificate lookup when native-roots is enabled for rustls 0.22.

* awc: update changelog for rustls 0.23

* awc: Add base rustls-0_23 feature without roots to better enable custom config

* actix-test: add rustls-0.23

* actix-test: add rustls 0.23 to changelog

* awc: update changelog with rustls 0.23 tweaks

* actix-web: add rustls 0.23

* Add rustls-0_23 to CI

* Update tls_rustls.rs

* review nits

* review nits part 2

* fix doc test

---------

Co-authored-by: Rob Ede <robjtede@icloud.com>
2024-05-18 19:05:58 +00:00
dependabot[bot] fff45b28f4
build(deps): update brotli requirement from 3.3.3 to 6.0.0 (#3353)
* build(deps): update brotli requirement from 3.3.3 to 6.0.0

Updates the requirements on [brotli](https://github.com/dropbox/rust-brotli) to permit the latest version.
- [Release notes](https://github.com/dropbox/rust-brotli/releases)
- [Commits](https://github.com/dropbox/rust-brotli/compare/3.3.3...6.0.0)

---
updated-dependencies:
- dependency-name: brotli
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* docs: update changelogs

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rob Ede <robjtede@icloud.com>
2024-05-14 08:58:05 +00:00
asonix 33c47c0ba9
Fix type confusion in some scenarios (#3348)
* Fix type confusion in some scenarios

When the feature for rustls 0.22 is enabled, and rustls 0.23 is also
present in a project, there suddently exist multiple paths for errors
when building middleware chains due to the use of two consecutive `?`
operators without specifying the intermediate error type.

This commit addresses the issue by removing the first `?`, so that the
first error type will always be known, and the second `?` always has a
well defined implementation.

* Add CHANGES entry about type confusion

---------

Co-authored-by: Rob Ede <robjtede@icloud.com>
2024-05-14 05:45:35 +00:00
Rob Ede 49020e79ae
chore: update base64 to v0.22 2024-03-03 22:18:29 +00:00
LoveSy c10f05a867
Add unicode feature to switch between regex and regex-lite crates as a trade-off between full unicode support and binary size (#3291)
* - Add `unicode` feature to switch between `regex` and `regex-lite`

as a trade-off between full unicode support and binary size.

* Update CHANGES.md

* Update CHANGES.md

* refactor: move regexset code selection to own module

* docs: add docs within RegexSet module

* chore: restore manifests

* test: ensure all actix-router codepaths are tested

---------

Co-authored-by: Rob Ede <robjtede@icloud.com>
2024-03-03 15:50:16 +00:00
Rob Ede 1e08ebabf9
build: bump MSRV to 1.72 2024-02-13 01:24:34 +00:00
Rob Ede 1e2ef6f92f
perf: remove unnecessary allocation when writing http dates (#3261) 2024-02-07 03:47:30 +00:00
Rob Ede 2b8c528e54
chore(actix-web): prepare release 4.5.1 2024-02-04 01:22:36 +00:00
Rob Ede 8e9e9fbcdd
chore(actix-web): prepare release 4.5.0 2024-02-04 00:32:28 +00:00
Rob Ede 2125aca2c5
Rustls v0.22 support (#3275) 2024-02-03 23:55:01 +00:00
Rob Ede 9dc3ad754e
chore(actix-web): prepare release 4.4.1 2023-12-23 19:19:10 +00:00
Amit Upadhyay c0615f28ed
Make compression middleware prefer brotli over zstd over gzip (#3189)
* AcceptEncoding.preference() prefers brotli > zstd > gzip

* AcceptEncoding.{ranked,negotiate}() prefers brotli > zstd > gzip

* changelog entry

* use browser-realistic encoding tests

* fix choosing identity when q=0

---------

Co-authored-by: Rob Ede <robjtede@icloud.com>
2023-11-19 18:54:08 +00:00
Marcio Ordonez 9d1f75d349
fix: content type required flag (#3168)
* fix: content type required flag

* clarify comments for invalid json mime type

* remove pr reference

---------

Co-authored-by: Rob Ede <robjtede@icloud.com>
2023-11-19 11:22:55 +00:00
dependabot[bot] b78f6da05f
build(deps): update zstd requirement from 0.12 to 0.13 (#3165)
* build(deps): update zstd requirement from 0.12 to 0.13

Updates the requirements on [zstd](https://github.com/gyscos/zstd-rs) to permit the latest version.
- [Release notes](https://github.com/gyscos/zstd-rs/releases)
- [Commits](https://github.com/gyscos/zstd-rs/compare/v0.12.0...v0.13.0)

---
updated-dependencies:
- dependency-name: zstd
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: update changelogs

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rob Ede <robjtede@icloud.com>
2023-10-30 01:18:45 +00:00
Rob Ede 2b40033a9c
chore(actix-web): prepare release 4.4.0 2023-08-29 01:54:40 +01:00
Rob Ede 84eb8b306c
chore: remove broken links from changelogs 2023-08-29 01:14:33 +01:00
Rob Ede 384ca0a2cd
chore: remove dates from changelogs 2023-08-29 01:14:33 +01:00
Rob Ede 905c30af86
Actix Web Rustls v0.21 support (#3116) 2023-08-29 01:11:11 +01:00
Wyatt Herkamp cbf5e948db
Implement Deserialize and Default for actix_web::Data (#3109)
* Implement Default and Deserialize for Data

* FMT

* Change Log

* tweak changelog

* chore: whitespace

---------

Co-authored-by: Rob Ede <robjtede@icloud.com>
2023-08-27 22:47:05 +00:00
Rob Ede b4fcdffdc3
chore: update msrv to 1.68 (#3094) 2023-08-01 19:33:32 +01:00
Rob Ede 6a0ea51b15
add ContentLength typed header (#2490) 2023-07-22 03:16:01 +01:00
Rob Ede 146011018e
add payload to_bytes helpers (#3083) 2023-07-22 02:02:29 +01:00
cyqsimon 1040bc3d17
Add missing status code constructor methods on HttpResponse (#3042) 2023-07-20 10:36:49 +00:00
Rob Ede db99da5daf
do not compress media types (#3075)
* misc: add temporary nix file

* Add test to check content type image/*

* misc: add unit test for expected behaviour jpeg

* feat(compress): add compress function to middleware

* feat(compress): use response content type to decide compress

* feat(compress): give more control to the user

* misc: improve default compress function

* add Compress::with_predicate

* remove predicate options

* assert auto traits on Compress

* fix changelog

---------

Co-authored-by: William R. Arellano <arellanowr@gmail.com>
2023-07-19 20:24:32 +01:00
Nathan Shaaban 80185ce741
Hide authorization header in httprequest debug output (#2953)
Co-authored-by: Nathan Shaaban <86252985+nshaaban-cPacket@users.noreply.github.com>
Co-authored-by: Rob Ede <robjtede@icloud.com>
2023-07-19 18:51:17 +00:00
James Rowe bf03207ca9
Add http2 optional feature (#3072)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2023-07-17 20:59:10 +00:00
Rob Ede 241da6e081
update MSRV to 1.65 (#3059) 2023-07-02 01:09:15 +01:00
Rob Ede 8b2b755cde
fix guard mod docs 2023-05-06 11:37:11 +01:00
Rob Ede e81dc768dc
expose h2c methods on HttpServer (#2999
* expose h2c methods on HttpServer

* update h2c docs
2023-04-06 03:11:28 +01:00
Rob Ede 19c9d858f2
support 16 extractors 2023-03-12 04:29:22 +00:00
Rob Ede d7c6774ad5
add resource method helpers (#2978) 2023-03-02 08:22:22 +00:00
Rob Ede d77bcb0b7c
update date in unreleased changelog sections 2023-02-26 21:45:36 +00:00
Rob Ede e35ec28cd2
prepare actix-web release 4.3.1 2023-02-26 03:44:34 +00:00
Rob Ede 35006e9cae
prepare actix-web-codegen release 4.2.0 2023-02-26 03:42:27 +00:00
Rob Ede e2fed91efd
format markdown with prettier 2023-02-26 03:26:51 +00:00
edgerunnergit 65c0545a7a
added support for creating custom methods with route macro (#2969)
Co-authored-by: Rob Ede <robjtede@icloud.com>
Closes https://github.com/actix/actix-web/issues/2893
2023-02-06 12:40:41 +00:00
Rob Ede df6fde883c
prepare actix-web release 4.3.0 2023-01-21 18:57:42 +00:00
Zach 6627109984
Add fallible versions of test_utils helpers to actix-test (#2961)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2023-01-11 11:43:51 +00:00
Rob Ede 06c3513bc0
add Allow header to resource's default 405 handler (#2949) 2022-12-21 20:28:45 +00:00
Rob Ede 3c69d078b2
add redirect service (#1961) 2022-11-25 21:44:52 +00:00
Rob Ede d708a4de6d
add acceptable guard (#2265) 2022-11-25 21:04:24 +00:00
Benny Nazimov ad7e67f940
add middleware::logger::custom_response_replace (#2631)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2022-09-26 18:44:51 +00:00
e-rhodes bd5c0af0a6
Add ability to set default error handlers to the ErrorHandler middleware (#2784)
Co-authored-by: erhodes <erik@space-nav.com>
Co-authored-by: Rob Ede <robjtede@icloud.com>
2022-09-15 13:06:34 +00:00
Rob Ede 909461087c
add ContentDisposition::attachment constructor (#2867) 2022-09-13 01:19:25 +01:00
Rob Ede 40f7ab38d2
prepare actix-web release 4.2.1 2022-09-12 10:43:03 +01:00
Rob Ede a9e44bcf07
fix -http version to 3.2.2 (#2871)
fixes #2869
2022-09-12 10:42:22 +01:00
Rob Ede 7767cf3071
prepare actix-web release 4.2.0 2022-09-11 16:44:46 +01:00
Rob Ede 679f61cf37
bump msrv to 1.59 2022-08-27 13:14:16 +01:00
Roland Fredenhagen 8759d79b03
routes macro allowing multiple paths per handler (#2718)
* WIP: basic implementation for `routes` macro

* chore: changelog, docs, tests

* error on missing methods

* Apply suggestions from code review

Co-authored-by: Igor Aleksanov <popzxc@yandex.ru>

* update test stderr expectation

* add additional tests

* fix stderr output

* remove useless ResourceType

this is dead code from back when .to and .to_async were different ways to add a service

Co-authored-by: Igor Aleksanov <popzxc@yandex.ru>
Co-authored-by: Rob Ede <robjtede@icloud.com>
2022-07-04 04:31:49 +00:00