Commit Graph

324 Commits

Author SHA1 Message Date
Yuki Okushi 4702c0fdf9
test(web): skip 64-bit test on 32-bit platforms (#3993) 2026-03-31 18:05:52 +09:00
Romain Roffé 4fcde646b9
fix(windows): enable dual-stack IPv6 sockets by default (#3988)
* fix(windows): enable dual-stack IPv6 sockets by default

On Windows, IPV6_V6ONLY defaults to true, so binding to [::] only
accepts IPv6 connections. Set it to false so that IPv6 listeners also
accept IPv4 traffic, matching the default Linux behavior.

* chore: add test

---------

Co-authored-by: Romain Roffé <r2@kyber.media>
Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2026-03-29 10:21:46 +00:00
Romain Roffé 25c5b5c4cf
docs: Fix default value for HttpServer backlog (#3987)
HttpServer::new() initialize backlog to 1024 instead of 2048.

The default value has been changed from 2048 to 1024 in
eae48f9612.

Co-authored-by: Romain Roffé <r2@kyber.media>
2026-03-27 11:05:18 +00:00
Rob Ede 9c2864c2c3
fix: yield lines correctly in readlines across split chunks (#3970) 2026-03-10 10:28:26 +00:00
Yuki Okushi 975b6efe89
fix(web): fix `match_*` incorrectness (#3946) 2026-02-26 20:06:47 +09:00
WaterWhisperer d3bf929040
fix: panic when `.to()/.service()` called after `.wrap()` on Route (#3944)
* fix: panic when `.to()/.service()` called after `.wrap()` on Route

* tweak

---------

Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2026-02-21 09:21:43 +00:00
Yuki Okushi 8b7270a09f
chore(web): release v4.13.0 (#3941) 2026-02-18 10:32:25 +00:00
Yuki Okushi 0ffaa78a32
docs(web): document introspection feature (#3937) 2026-02-18 17:14:25 +09:00
Yuki Okushi 5a6c8d235b
feat(http,web): expose config for H2 window sizes (#3926)
* feat(http,web): expose config for H2 window sizes

* changelog
2026-02-15 16:36:27 +09:00
Yuki Okushi 6d81907540
fix(files,http,web): do not compress 206 at all (#3923) 2026-02-15 08:56:43 +09:00
Yuki Okushi 0fb2527c60
fix(router,web): fix panic when normalizing and rewriting paths (#3919) 2026-02-12 21:28:17 +09:00
Yuki Okushi 7d81d7b5c8
docs(web): Add notes for request headers (#3921) 2026-02-12 21:28:02 +09:00
Yuki Okushi d66f89b7b6
feat(http,web): add config for `TCP_NODELAY` (#3918) 2026-02-12 05:57:02 +09:00
Yuki Okushi d98b35db92
docs(web): add note about experimental feature (#3916) 2026-02-11 15:45:14 +09:00
Guillermo Céspedes Tabárez 84ddfe7b97
feat(web): initial support for route and HTTP method introspection (#3594)
* feat(resources-introspection): add support for resource metadata retrieval

* misc: remove debug print

* style: cargo fmt

* fix(guards): replace take_guards with get_guards to prevent guard removal and fix test failures

* ci: downgrade for msrv litemap to version 0.7.4 in justfile

* chore: update changelog and fix docs for CI

* ci: downgrade for msrv zerofrom to version 0.1.5 in justfile

* refactor: improve thread safety and add unit tests for introspection process

* fix(introspection): add conditional arbiter creation for io-uring support

* fix(introspection): add conditional arbiter creation for io-uring support

* refactor(introspection): add GuardDetail enum and remove downcast_ref usage

- Added `GuardDetail` enum to encapsulate various introspection details of a guard.
- Refactored `HttpMethodsExtractor` implementation to use `GuardDetail` instead of `downcast_ref`.

* refactor(introspection): add GuardDetail enum and remove downcast_ref usage

- Added `GuardDetail` enum to encapsulate various introspection details of a guard.
- Refactored `HttpMethodsExtractor` implementation to use `GuardDetail` instead of `downcast_ref`.

* feat(introspection): rename feature from `resources-introspection` to `experimental-introspection`
- Refactored introspection logic.
- Enhanced route introspection to register HTTP methods and guard names.
- Added example for testing the experimental introspection feature.

* fix Cargo.lock

* feat(introspection): enhance introspection feature with detailed route registration and full path tracking

* optimize debug log and apply clippy/fmt suggestions

* feat(introspection): enhance introspection handlers for JSON and plain text responses

* feat(introspection): implement experimental introspection feature with multiple App instances

* Enhance experimental introspection feature with detailed route reporting

- Introduced a new `experimental-introspection` feature that provides comprehensive reports on configured routes, including paths, methods, guards, and resource metadata.
- Added support for reachability hints to identify shadowed or conflicting routes.
- Implemented new endpoints for external resources reporting.
- Updated existing route registration to include detailed introspection data.
- Enhanced guard implementations to provide introspection details.

* Refactor route registration to use RouteInfo struct & cargo clippy

* put all the items behind feature gate

* tweak

* fmt

---------

Co-authored-by: Guillermo Céspedes Tabárez <gcespedes@prexcard.com>
Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2026-02-11 06:25:39 +00:00
Filip Gregor 32cb3b8361
feat: ignore unparsable cookies in Cookie header (#3814)
fix: ignore unparsable cookies in Cookie header

Co-authored-by: Rob Ede <robjtede@icloud.com>
2026-02-09 12:53:40 +00:00
Yuki Okushi 69edde9662
feat(web): implement `HttpRequest::url_for_iter`/`url_for_map` (#3895) 2026-02-01 16:54:47 +09:00
dependabot[bot] e62d849656
build(deps): bump time from 0.3.45 to 0.3.46 (#3893)
* build(deps): bump time from 0.3.45 to 0.3.46

Bumps [time](https://github.com/time-rs/time) from 0.3.45 to 0.3.46.
- [Release notes](https://github.com/time-rs/time/releases)
- [Changelog](https://github.com/time-rs/time/blob/main/CHANGELOG.md)
- [Commits](https://github.com/time-rs/time/compare/v0.3.45...v0.3.46)

---
updated-dependencies:
- dependency-name: time
  dependency-version: 0.3.46
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* chore(*): bump MSRV to 1.88

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2026-01-28 08:10:27 +00:00
dependabot[bot] 31000ae423
build(deps): bump time from 0.3.44 to 0.3.45 (#3885)
* build(deps): bump time from 0.3.44 to 0.3.45

Bumps [time](https://github.com/time-rs/time) from 0.3.44 to 0.3.45.
- [Release notes](https://github.com/time-rs/time/releases)
- [Changelog](https://github.com/time-rs/time/blob/main/CHANGELOG.md)
- [Commits](https://github.com/time-rs/time/compare/v0.3.44...v0.3.45)

---
updated-dependencies:
- dependency-name: time
  dependency-version: 0.3.45
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* chore(*): update MSRV to 1.83

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2026-01-20 10:18:50 +00:00
Yuki Okushi 41f99b0ddd
fix(*): replace rustls-pemfile (#3855) 2025-12-12 08:11:24 +09:00
Rob Ede ff50dd03a6
chore: upgrade MSRV to 1.82 (#3844) 2025-11-26 20:26:35 +00:00
Yuki Okushi 24489d4c6d
doc(web): Fix links in README.md (#3834) 2025-11-26 16:40:07 +00:00
Rob Ede fe6c0a3b2b
chore(actix-web): prepare release 4.12.1 2025-11-26 16:34:38 +00:00
Rob Ede 37a8b9caa8
chore(web): fix actix-http requirement
fixes #3832
2025-11-26 16:32:41 +00:00
Yuki Okushi d119500f93
release: actix-web v4.12.0 (#3830) 2025-11-16 15:52:36 +09:00
Yuki Okushi a3f95ee1ef
feat: improve `HttpResponseBuilder::streaming` with SizedStream (#3829) 2025-11-16 15:22:29 +09:00
Ruchir e1da110e92
chore: Add public export for `EitherExtractError` (#3826)
* chore: Export EitherExtractError for public use

* refactor: export EitherExtractError
2025-11-11 15:28:40 +00:00
Yuki Okushi d5fae3ecc2
chore: rename branch to main (#3821) 2025-11-05 20:13:50 +09:00
Thales Fragoso fde7934243
Add option to allow/disallow half closures in HTTP/1 (#3777)
* Add ServiceConfigBuilder to facilitate future extensions

Signed-off-by: Thales Fragoso <thales.fragoso@axiros.com>

* Add option to allow/disallow h1 half closures

The default is set to allow, thus reverting a change made in 3.11.1

Signed-off-by: Thales Fragoso <thales.fragoso@axiros.com>

* Add tests for h1 half closures

Signed-off-by: Thales Fragoso <thales.fragoso@axiros.com>

* Comply with clippy

Signed-off-by: Thales Fragoso <thales.fragoso@axiros.com>

* Adjust imports to satisfy fmt

Signed-off-by: Thales Fragoso <thales.fragoso@axiros.com>

---------

Signed-off-by: Thales Fragoso <thales.fragoso@axiros.com>
2025-10-04 23:03:26 +00:00
Yuki Okushi 429ff82a4b
fix: rename doc_auto_cfg feature (#3787) 2025-09-29 10:42:56 +00:00
Martin Grigorov b200a45c8e
Remove duplicated entry for "serde::*" in cargo_check_external_types config (#3776) 2025-09-22 11:05:48 +00:00
Rob Ede d43738306c
refactor: init hickory DNS using OnceCell 2025-09-09 09:03:09 +01:00
励志买套上海苏河湾大平层 3c2907da41
docs(middleware): complete middleware author's guide (#3680)
Add comprehensive documentation for middleware development in Actix Web, including:
- Detailed explanation of middleware concepts and execution flow
- Clear description of middleware traits and their responsibilities
- Guidelines for body type handling
- Best practices for middleware development
- Error handling recommendations
- Usage scenarios and anti-patterns

Co-authored-by: chenjjiaa <chenjjiaaa@gmail.com>
2025-08-29 20:12:05 +00:00
George Pollard 5041cd1c65
Make 'ws' feature of actix-http optional in actix-web (#3734)
* Make 'ws' feature of actix-http optional

* Update CHANGES.md

* Update actix-web-actors

* Update CHANGES.md

* nits

* nits

---------

Co-authored-by: Rob Ede <robjtede@icloud.com>
2025-08-29 02:50:05 +00:00
Rob Ede 68624ec63b
chore: remove now-useless docs.rs flags 2025-08-26 23:51:22 +01:00
Rob Ede ddd16ec9db
chore(actix-http): prepare release 3.11.1 2025-08-26 07:28:27 +01:00
Andrew Scott c6352005f7
fix: include content-length with bytes payload (#3695)
* fix: include content-length with bytes payload

* chore: json unit-test patch

* Update doc comment

---------

Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2025-08-24 09:42:11 +00:00
Yuki Okushi aeb42486af
fix(actix-web): improve streaming response behavior for Content-Length and Content-Type (#3737)
- Set default Content-Type to application/octet-stream for streaming responses
- Respect Content-Length header by automatically calling `no_chunking()` when set
- Resolves issue where Content-Length was ignored in streaming responses

Fixes #2306

---------

Co-authored-by: Yinuo Deng <i@dyn.im>
2025-08-23 12:23:57 +09:00
Yuki Okushi d5abb5ae45
docs(web): Fix invalid link for `HttpRequest::match_info()` (#3735) 2025-08-20 12:58:28 +00:00
Thomas de Zeeuw 95ad1caa23
Update socket2 to v0.6 (#3688) 2025-07-14 01:13:01 +00:00
Luca Cappelletti fd81e6ee0d
Resolved collisions between `missing_docs` clippy lints (#3653)
* Trying to resolve the clippy forbid(missing_doc) in web codegen

* Specifying to use workspace version

* Restored cargo toml as they were

* Restored toml and lock to original

* Replaced `#[doc(hidden)]` with documentation comments

* Reformatted code

* Removed auto-generated doc comment as existing doc comment should be fine
2025-05-24 15:50:14 +00:00
Rob Ede 2c55d659dd
chore(actix-web): prepare release 4.11.0 2025-05-10 06:19:10 +01:00
Rob Ede 276f5d5bd4
chore(actix-http): prepare release 3.11.0 2025-05-10 06:18:25 +01:00
Rob Ede 5f3c02813a
chore: narrow tokio dep to account for RUSTSEC-2025-0023
closes #3640
2025-05-10 06:09:51 +01:00
Degubi 3d3b31e16a
fix: svg files should be compressed (#3486)
* Fix svg files not being compressed

* docs: update changelog

---------

Co-authored-by: Rob Ede <robjtede@icloud.com>
2025-05-10 03:21:36 +00:00
Joel Wurtz 3147aaccc7
feat: do not use host header on http2 for guard (#3525)
* feat(guard): do not use host header on http2 for guard

* docs: update changelog

---------

Co-authored-by: Rob Ede <robjtede@icloud.com>
2025-05-10 02:42:00 +00:00
Björn Wärmedal a49f055561
build(deps): update url requirement from 2.1 to 2.5.4 (#3527)
Co-authored-by: Björn Wärmedal <bjorn.warmedal@lumera.com>
Co-authored-by: Rob Ede <robjtede@icloud.com>
2025-05-10 02:00:20 +00:00
Rob Ede 55268b6898
fix: improve logger header values printing 2025-05-10 02:56:41 +01:00
Rob Ede 89b5b04653
docs: update docs about peer_addr when bound to a UDS socket 2025-05-10 02:23:22 +01:00
silverpill e42cffc28d
Fix HttpRequest::peer_addr documentation 2025-05-10 02:20:13 +01:00