* 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>
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>
* 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>
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>
- 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>
* 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