1
0
Fork 0
mirror of https://github.com/tokio-rs/axum.git synced 2025-03-17 04:39:58 +01:00
Commit graph

774 commits

Author SHA1 Message Date
David Pedersen
19fe93262f
Use impl IntoResponse less in docs () 2022-05-22 13:41:29 +02:00
Jonas Platte
1d7878c3c8
axum-extra: 0.3.3 ()
* axum-extra: 0.3.3

* Update axum-extra/CHANGELOG.md

* Update axum-extra/CHANGELOG.md

* depend on axum-macros 0.2.2

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2022-05-18 20:29:49 +02:00
Jonas Platte
80d0cc19e6
axum-macros: 0.2.2 () 2022-05-18 20:23:56 +02:00
Christofer Nolander
d7c4e2f807
Implement Default for Extension () 2022-05-18 15:44:08 +00:00
David Pedersen
5948cde6c1
Support customizing rejections for #[derive(TypedPath)] ()
* Support customizing rejections for `#[derive(TypedPath)]`

* changelog

* clean up
2022-05-17 21:36:05 +02:00
Jonas Platte
b215a87a19
Add axum_extra::extract::Query 2022-05-17 20:19:24 +02:00
David Pedersen
be71e7b286
Fix vulnerability in example-stream-to-file example ()
* Fix vulnerability in example-stream-to-file example

* Save files to separate directory
2022-05-17 12:38:15 +02:00
David Pedersen
7d88bd3a66
Check for multiple body extractors in debug_handler ()
* Check for multiple body extractors in `debug_handler`

* changelog link
2022-05-16 14:11:40 +00:00
David Pedersen
05529c8efc
Check Request and Path in debug_handler ()
* Check `Request` and `Path` in `debug_handler`

* changelog links

* Include errors with the input
2022-05-16 10:05:17 +00:00
David Pedersen
316e20fbd9
axum: Version 0.5.6 () 2022-05-15 23:05:00 +02:00
David Pedersen
3e722379ac Add changelog link 2022-05-15 20:07:29 +02:00
David Pedersen
61c4e19598
axum-extra: 0.3.2 () 2022-05-15 20:01:00 +02:00
David Pedersen
a8e2390724 Add axum-tungstenite to ecosystem 2022-05-15 17:26:52 +02:00
David Pedersen
178e1801e9
Add axum_extra::extract::Form ()
* Add `axum_extra::extra::Form`

* update tokio-util ban
2022-05-15 15:17:45 +00:00
Kosta
d37b93a3c4
Dont link to deprecated item with different name () 2022-05-12 12:06:13 +00:00
Jonas Platte
591434778f
Slightly simplify CORS example () 2022-05-12 11:36:57 +02:00
David Pedersen
0b856b938f
Document "debugging handler type errors" on Handler () 2022-05-11 20:56:57 +02:00
David Pedersen
08cbade3cb
Improve Path error when its extracted multiple times ()
* Improve `Path` error

* Improve docs

* changelog

* Update axum/src/extract/path/mod.rs

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>

* fix test

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2022-05-11 11:38:37 +02:00
Matteo Joliveau
280334347b
Add protocol field to WebSocket ()
* Add protocol field to WebSocket

Signed-off-by: Matteo Joliveau <matteojoliveau@gmail.com>

* Use HeaderValue instead of String

Signed-off-by: Matteo Joliveau <matteojoliveau@gmail.com>

* Update axum/src/extract/ws.rs

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>

* Update changelog

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2022-05-11 08:49:44 +00:00
David Pedersen
cfdac03c8d
axum-extra: Version 0.3.1 () 2022-05-10 12:05:36 +00:00
David Pedersen
46e6d3493b
axum-macros: Version 0.2.1 () 2022-05-10 11:46:17 +00:00
David Pedersen
96aaac4865
axum: Version 0.5.5 () 2022-05-10 11:43:08 +00:00
David Pedersen
2353ee788c
Make docs around extracting Request more explicit () 2022-05-10 11:00:57 +00:00
David Pedersen
7774cfd1f7
Update static file server example () 2022-05-08 19:52:34 +00:00
David Pedersen
852e548e19
Support #[derive(FromRequest)] on enums ()
* Support `#[from_request(via(...))]` on enums

* Check `#[from_request]` on variants

* check for non enum/struct and clean up

* changelog

* changelog

* remove needless feature

* changelog ref
2022-05-08 20:04:56 +02:00
David Pedersen
a3a32f493e
Add MethodRouter::{into_make_service, into_make_service_with_connect_info} () 2022-05-08 19:48:48 +02:00
lz1998
b8514cf1c2
Update LICENSE () 2022-05-07 16:20:07 +02:00
David Pedersen
6bd726f4a9
Refactor #[derive(FromRequest)] to make illegal state unrepresentable () 2022-05-06 16:53:12 +02:00
David Pedersen
b5183afbec
Support wildcards in typed paths ()
* Support wildcards in typed paths

* changelog
2022-05-06 13:05:30 +02:00
David Pedersen
4ff78e552d
Support Option and Result in typed paths ()
* Support `Option` and `Result` in typed paths

* changelog

* Update axum-extra/CHANGELOG.md

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>

* fix one more

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2022-05-06 09:42:10 +02:00
David Pedersen
d19beffd6d
Handle GET, HEAD, and OPTIONS correctly in ContentLengthLimit ()
* Handle `GET`/`HEAD`/`OPTIONS` in `ContentLengthLimit`

* changelog

* Apply suggestions from code review

Co-authored-by: Marcus Griep <marcus@griep.us>

* Don't allow GET/HEAD/OPTIONS with `transfer-encoding: chunked`

* simplify constructing chunked body

* Update axum/src/extract/content_length_limit.rs

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>

Co-authored-by: Marcus Griep <marcus@griep.us>
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2022-05-05 09:17:54 +02:00
takumi
4b384fa01c
upgrade uuid from 0.8 to 1.0 () 2022-05-05 07:48:49 +02:00
Conrad
002cff5c79
fix link about backpressure from routing section () 2022-05-04 06:07:24 +00:00
Thomas Scholtes
8cc052f38b
Make Path extractor work with Deserialize impls using &str ()
* `Path` extractor works with `Deserialize` impls using `&str`

Before this change the extractor `Path<Test>` would fail if the
`Deserialize` implementation of `Test` was calling
`Deserializer::deserialize_str()`.

Now we use `Visitor::visit_borrowed_str()` instead of
`Visitor::visit_str()` which is also recommended in the guide to
implement a deserializer [1].

[1]: https://serde.rs/impl-deserializer.html

* fixup! `Path` extractor works with `Deserialize` impls using `&str`

* add test for percent decoding

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2022-05-03 18:44:58 +00:00
David Pedersen
d1043db254
Fix driving readiness for example-rest-grpc-multiplex () 2022-05-03 09:21:49 +00:00
Gabriel Lacroix
d2fab9245b
Fix some typos and grammatical mistakes () 2022-05-03 06:30:17 +00:00
takumi
4ff5e409e3
Add rest and grpc example ()
* Add rest and grpc example

* remove needless dependencies

* Apply suggestions from code review

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>

* Update examples/rest-grpc-multiplex/src/main.rs

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>

* Update examples/rest-grpc-multiplex/src/main.rs

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>

* Update examples/rest-grpc-multiplex/src/multiplex_service.rs

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>

* Update examples/rest-grpc-multiplex/Cargo.toml

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>

* Update examples/rest-grpc-multiplex/src/multiplex_service.rs

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>

* clean noisy code

* fix nitpicks

* missing newline

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2022-05-02 15:52:55 +00:00
Rohan Jain
a223fd8b85
Ignore target directories in individual examples ()
These get created with `rust-analyzer`, which pollutes the git status
output.
2022-05-02 17:20:23 +02:00
David Pedersen
5be73c1064
axum-core: Version 0.2.4 () 2022-05-02 11:52:24 +02:00
David Pedersen
8dd6070574
Implement IntoResponse for (Parts | Request<()>, $(impl IntoResponseParts)+, impl IntoResponse) ()
* Implement `IntoResponse for (Parts | Request<()>, $(impl IntoResponseParts)+, impl IntoResponse)`

Fixes 

* changelog

* docs

* changelog ref
2022-04-29 22:08:47 +02:00
David Pedersen
1fe4558362
Move examples to separate workspace ()
* Move examples to separate workspace

* update commands to run examples

* remove debug
2022-04-29 18:53:41 +02:00
Marcus Griep
6e1835074c
Implement IntoResponse for Response<()> and response::Parts ()
* feat(axum-core): add IntoResponse for `http::response` types

* chore: narrow impl to `Response<()>`

* include extensions

* changelog

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2022-04-29 17:52:21 +02:00
David Pedersen
5bb924b3a2
Implement IntoResponse and IntoResponseParts for http::Extensions ()
* Implement `IntoResponse` and `IntoResponseParts` for `http::Extensions`

Requires a new release of `http`.

* remove http patch

* changelog ref
2022-04-29 17:28:24 +02:00
Sergio C. Arteaga
d606728333
ecosystem: Add CLOMonitor to project showcase () 2022-04-27 15:32:51 +02:00
David Pedersen
a3b6cbc99c
axum-extra: Version 0.3.0 ()
* axum-extra: Version 0.3.0

* add tower-http update to changelog
2022-04-27 10:27:41 +02:00
David Pedersen
700617963f
Move private and signed cookies behind feature flags ()
* move signed cookies into their own module

* Require features for private/signed cookies

* enable "cookie" feature when enabling private/signed cookies

* add `#[cfg]`s in a few more places
2022-04-27 10:11:16 +02:00
David Pedersen
a723ed1453
axum: Version 0.5.4 () 2022-04-26 16:50:44 +02:00
David Pedersen
0702c59c7d
axum-core: Version 0.2.3 () 2022-04-26 14:19:47 +00:00
David Pedersen
23f20ea1f3
Replace ByteStr with Arc<str> () 2022-04-26 10:16:38 +02:00
takumi
bc6fefb052
Remove needless map () 2022-04-26 09:15:04 +02:00