Søren Løvborg
9ed1ad69d2
axum: add ListenerExt::limit_connections ( #3489 )
2025-09-23 23:25:36 +02:00
tottoto
50f0082970
axum: Make futures-sink optional dependency ( #3491 )
2025-09-22 23:58:30 +09:00
David Mládek
cc11b5ad7d
axum-extra: gate rejection test behind feature ( #3493 )
2025-09-22 14:18:46 +02:00
tottoto
817aae3d1e
axum-extra: Add link definition for pull request to changelog ( #3492 )
2025-09-22 09:30:03 +02:00
tottoto
4d8a6f6f0f
axum-extra: Make rustversion and serde_core optional dependency ( #3487 )
2025-09-21 06:32:56 +09:00
tottoto
f09f50c50a
axum-extra: Remove unused tower dependency ( #3486 )
2025-09-20 20:57:04 +00:00
tottoto
d184798937
axum-extra: Make axum optional dependency ( #3485 )
2025-09-20 22:50:56 +02:00
Mattia Penati
40e9d7b22a
Add tower-otel
to ECOSYSTEM.md ( #3482 )
2025-09-17 11:52:34 +02:00
Fredrik Park
600b16d431
Spelling misstake in Using closure capture ( #3481 )
2025-09-16 22:33:39 +02:00
Loic Hausammann
e43030d051
websocket: add a wrapper around is_terminated ( #3443 )
...
Co-authored-by: Loic <loic@daedalean.ai>
Co-authored-by: loikki <851651-loikki@users.noreply.gitlab.com>
2025-09-16 15:54:44 +00:00
othelot
ab593bbab7
routing: omit the Allow
header for non-405 method not allowed fallbacks ( #3465 )
2025-09-16 08:29:01 +00:00
Søren Løvborg
1073468163
axum::serve: Enable Hyper request header timeout ( #3478 )
...
It's possible for an HTTP request to get stuck (due to network issues or
malicious clients) halfway through the request line or header, in which
case no amount of timeouts configured by an application using axum/tower
will help, since Hyper hasn't yet handed off the request to the service.
This has two consequences:
- Wasted memory: Up to ~1 MB per connection in the worst case, compared
to the ~2.5 kB used by a regular idle connection.
- A `with_graceful_shutdown` signal will cause the server to stop
accepting new requests, but then hang instead of actually stopping.
This changes axum::serve to configure a Timer for HTTP/1 connections,
which activates Hyper's default timeout (currently 30 seconds).
The timeout applies only to the request line and request header, not the
request body or subsequent response (where axum applications can instead
simply configure a timeout using `tower_http::timeout::TimeoutLayer`).
The timeout does not currently apply to newly opened connections, even
though Hyper's `header_read_timeout` SHOULD apply here too since 1.4.0;
discussion on tokio-rs#2741 suggests a possible TokioIo issue. However, the
graceful shutdown still works as expected for such connections.
The timer is only enabled for HTTP/1 here since similar functionality
does not currently appear to exist for HTTP/2 connections in Hyper.
This is a breaking change for any axum::serve users who currently rely
on being able to begin sending a HTTP/1 request, and then take more than
30 seconds to finish the request line and headers, or rely on keeping
connections idle for 30+ seconds between requests.
2025-09-16 10:19:20 +02:00
David Mládek
5c090dcb3e
axum-extra: make option_layer
guarantee that the output body is axum::body::Body
2025-09-14 19:50:04 +02:00
David Mládek
853d7e707a
axum: add ResponseAxumBodyLayer
for mapping response body to axum::body::Body
2025-09-14 19:50:04 +02:00
Jonas Platte
4ab8df5e42
Switch serde dependency to serde_core ( #3477 )
2025-09-14 08:49:07 +02:00
K-tecchan
94af9c3262
axum: correct typo in append_allow_header ( #3476 )
2025-09-13 14:27:43 +00:00
tottoto
d5e505619f
Update to cargo-deny api version 2 ( #3475 )
2025-09-13 14:48:25 +02:00
tottoto
e8ab6029d1
examples: Update to askama 0.14 ( #3474 )
2025-09-13 13:19:19 +02:00
tottoto
8d0497f793
examples: Update to brotli 8 ( #3473 )
2025-09-13 10:29:21 +02:00
tottoto
1b844c9fc6
examples: Update to metrics 0.24 ( #3472 )
2025-09-13 10:06:19 +02:00
tottoto
83d19e7b4f
examples: Update to redis 0.32 ( #3471 )
2025-09-13 09:06:00 +02:00
tottoto
038f0966a8
examples: Update to diesel-async 0.6 ( #3470 )
2025-09-12 17:03:33 +02:00
tottoto
14f15252ee
Remove resolved cargo-deny skip-tree config of tracing-subscriber ( #3468 )
2025-09-12 13:23:09 +00:00
tottoto
490cde6048
examples: Update to axum-server 0.7 ( #3467 )
2025-09-12 15:18:33 +02:00
tottoto
a0748e5a74
examples: Update to tower-http 0.6 ( #3466 )
2025-09-12 13:44:24 +02:00
Niclas Klugmann
25acc8d131
Clarify that AddExtension
is not the actual Layer
( #3463 )
2025-09-12 09:21:19 +02:00
tottoto
e4550d23b1
examples: Update to oauth2 5 ( #3462 )
2025-09-11 15:34:41 +02:00
Joel Uckelman
5d5ba01be9
Add axum_extra::extract::Query::try_from_uri ( #3460 )
...
`axum::extract::Query` has a try_from_uri, which is useful for testing. This adds the same function to `axum_extra::extract::Query`.
2025-09-08 10:18:31 +02:00
Kenny Lau
64ae48347e
Fix typo in file_stream error message ( #3459 )
2025-09-07 12:49:22 +02:00
Canmi
3fc8e4ae0a
Add axum-governor to community maintained axum ecosystem ( #3456 )
2025-09-05 10:10:56 +02:00
tottoto
8f707ca9fd
ci: Refactor dependencies-are-sorted job ( #3445 )
2025-09-05 00:13:45 +02:00
Antoine Vandecreme
86868de80e
Reject JSON bodies with trailing chars ( #3453 )
2025-09-02 19:34:17 +00:00
Antoine Vandecreme
49c8facad3
Bump tracing-subscriber ( #3454 )
2025-09-02 13:01:31 -04:00
baerwang
ee1519c82f
Add openapi-rs to ECOSYSTEM.md ( #3414 )
2025-08-30 13:29:14 +00:00
tottoto
94db5273a5
ci: Update to actions/checkout v5 ( #3450 )
2025-08-28 15:41:09 +02:00
Poliorcetics
9ec85d6970
fix(axum-extra): don't require S
generic param when using FileStream::from_path()
( #3437 )
2025-08-17 07:14:07 +02:00
Patrik Lundin
4b0590b30e
examples/prometheus-metrics: run upkeep task ( #3430 )
...
Co-authored-by: David Mládek <david.mladek.cz@gmail.com>
2025-08-14 12:42:01 +00:00
Lukas Bergdoll
a57935c039
Generalize Connected
implementation to all Listener
s for SocketAddr
( #3331 )
...
Co-authored-by: David Mládek <david.mladek.cz@gmail.com>
2025-08-14 13:01:04 +02:00
reivilibre
76268ae52b
Document type parameter T
on Handler
( #3435 )
...
Signed-off-by: Olivier 'reivilibre <git.contact@librepush.net>
2025-08-14 11:10:52 +02:00
Glen De Cauwsemaecker
dfc15bce9d
Support custom (binary) data to be written into SSE Event ( #3425 )
2025-08-13 23:32:08 +02:00
Glen De Cauwsemaecker
d66cabd5e9
Fix ci failures ( #3432 )
2025-08-13 10:53:53 +02:00
Theodore Bjernhed
7f5cea0e6b
Update and centralize the LICENSE
file to the repo root ( #3401 )
2025-08-12 23:31:12 +02:00
Jan Runge
2977bd4adf
Extractors doc: correct linked example section ( #3349 )
2025-08-01 21:47:55 +00:00
Jonas Platte
ff031867df
Update minimum Rust version to 1.78 ( #3412 )
2025-07-20 07:47:56 +00:00
Yann Simon
3bd445d9ee
remove unused dep in tls examples ( #3411 )
2025-07-17 12:51:12 +00:00
chenlunfu
d9609d754f
Add qiluo-admin to ECOSYSTEM.md ( #3409 )
2025-07-16 13:37:44 -04:00
Kyle Nweeia
0832de443c
Use via extractor's rejection instead of axum::response::Response
( #3261 )
2025-07-16 09:50:59 +00:00
Theodore Bjernhed
6bc0717b06
Improve value and reference passing efficiency ( #3406 )
2025-07-11 05:38:45 +02:00
Glen De Cauwsemaecker
420d7b6aaa
Update ECOSYSTEM.md: Add datastar with axum support ( #3383 )
2025-07-09 19:16:12 +00:00
Theodore Bjernhed
1b157a461e
Enable and fix control flow related clippy lints
2025-07-09 18:48:28 +00:00