-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(deps): update rust crate axum to 0.7.0 #2
Open
renovate
wants to merge
1
commit into
main
Choose a base branch
from
renovate/axum-0.x
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
renovate
bot
force-pushed
the
renovate/axum-0.x
branch
from
January 31, 2022 23:16
d47062e
to
c892dbe
Compare
renovate
bot
changed the title
fix(deps): update rust crate axum to 0.4.4
fix(deps): update rust crate axum to 0.4.5
Jan 31, 2022
renovate
bot
changed the title
fix(deps): update rust crate axum to 0.4.5
fix(deps): update rust crate axum to 0.4.6
Feb 22, 2022
renovate
bot
force-pushed
the
renovate/axum-0.x
branch
from
February 22, 2022 14:08
c892dbe
to
17131d6
Compare
renovate
bot
force-pushed
the
renovate/axum-0.x
branch
from
March 1, 2022 14:27
17131d6
to
cce38e1
Compare
renovate
bot
changed the title
fix(deps): update rust crate axum to 0.4.6
fix(deps): update rust crate axum to 0.4.7
Mar 1, 2022
renovate
bot
force-pushed
the
renovate/axum-0.x
branch
from
March 2, 2022 13:20
cce38e1
to
2f9c1dc
Compare
renovate
bot
changed the title
fix(deps): update rust crate axum to 0.4.7
fix(deps): update rust crate axum to 0.4.8
Mar 2, 2022
renovate
bot
changed the title
fix(deps): update rust crate axum to 0.4.8
fix(deps): update rust crate axum to 0.5.3
Apr 25, 2022
renovate
bot
force-pushed
the
renovate/axum-0.x
branch
from
April 25, 2022 01:43
2f9c1dc
to
e5fa29f
Compare
renovate
bot
changed the title
fix(deps): update rust crate axum to 0.5.3
fix(deps): update rust crate axum to 0.5.5
May 15, 2022
renovate
bot
force-pushed
the
renovate/axum-0.x
branch
from
May 15, 2022 21:22
e5fa29f
to
5b1a2d1
Compare
renovate
bot
force-pushed
the
renovate/axum-0.x
branch
from
June 18, 2022 16:47
5b1a2d1
to
c59d3dd
Compare
renovate
bot
changed the title
fix(deps): update rust crate axum to 0.5.5
fix(deps): update rust crate axum to 0.5.8
Jun 18, 2022
renovate
bot
force-pushed
the
renovate/axum-0.x
branch
from
June 24, 2022 00:29
c59d3dd
to
783b1c9
Compare
renovate
bot
changed the title
fix(deps): update rust crate axum to 0.5.8
fix(deps): update rust crate axum to 0.5.9
Jun 24, 2022
renovate
bot
force-pushed
the
renovate/axum-0.x
branch
from
September 25, 2022 15:21
783b1c9
to
c3db399
Compare
renovate
bot
changed the title
fix(deps): update rust crate axum to 0.5.9
fix(deps): update rust crate axum to 0.5.16
Sep 25, 2022
renovate
bot
force-pushed
the
renovate/axum-0.x
branch
from
November 20, 2022 21:05
c3db399
to
b96375f
Compare
renovate
bot
changed the title
fix(deps): update rust crate axum to 0.5.16
fix(deps): update rust crate axum to 0.5.17
Nov 20, 2022
renovate
bot
force-pushed
the
renovate/axum-0.x
branch
from
March 16, 2023 17:44
b96375f
to
be9c06a
Compare
renovate
bot
changed the title
fix(deps): update rust crate axum to 0.5.17
fix(deps): update rust crate axum to 0.6.11
Mar 16, 2023
renovate
bot
force-pushed
the
renovate/axum-0.x
branch
from
March 22, 2023 21:47
be9c06a
to
bcf9fc1
Compare
renovate
bot
changed the title
fix(deps): update rust crate axum to 0.6.11
fix(deps): update rust crate axum to 0.6.12
Mar 22, 2023
renovate
bot
force-pushed
the
renovate/axum-0.x
branch
from
May 30, 2023 04:02
bcf9fc1
to
c1ca461
Compare
renovate
bot
changed the title
fix(deps): update rust crate axum to 0.6.12
fix(deps): update rust crate axum to 0.6.18
May 30, 2023
renovate
bot
force-pushed
the
renovate/axum-0.x
branch
from
July 18, 2023 05:55
c1ca461
to
efd20bd
Compare
renovate
bot
changed the title
fix(deps): update rust crate axum to 0.6.18
fix(deps): update rust crate axum to 0.6.19
Jul 18, 2023
renovate
bot
force-pushed
the
renovate/axum-0.x
branch
from
August 4, 2023 14:55
efd20bd
to
dd46b7f
Compare
renovate
bot
changed the title
fix(deps): update rust crate axum to 0.6.19
fix(deps): update rust crate axum to 0.6.20
Aug 4, 2023
renovate
bot
force-pushed
the
renovate/axum-0.x
branch
from
November 28, 2023 08:48
dd46b7f
to
5c85225
Compare
renovate
bot
changed the title
fix(deps): update rust crate axum to 0.6.20
fix(deps): update rust crate axum to 0.7.1
Nov 28, 2023
renovate
bot
force-pushed
the
renovate/axum-0.x
branch
from
December 4, 2023 17:51
5c85225
to
14b80c9
Compare
renovate
bot
changed the title
fix(deps): update rust crate axum to 0.7.1
fix(deps): update rust crate axum to 0.7.2
Dec 4, 2023
renovate
bot
force-pushed
the
renovate/axum-0.x
branch
from
December 30, 2023 14:38
14b80c9
to
66de76c
Compare
renovate
bot
changed the title
fix(deps): update rust crate axum to 0.7.2
fix(deps): update rust crate axum to 0.7.3
Dec 30, 2023
renovate
bot
force-pushed
the
renovate/axum-0.x
branch
from
January 13, 2024 17:53
66de76c
to
6cd34cd
Compare
renovate
bot
changed the title
fix(deps): update rust crate axum to 0.7.3
fix(deps): update rust crate axum to 0.7.4
Jan 13, 2024
renovate
bot
force-pushed
the
renovate/axum-0.x
branch
from
March 25, 2024 23:44
6cd34cd
to
138ec6f
Compare
renovate
bot
changed the title
fix(deps): update rust crate axum to 0.7.4
fix(deps): update rust crate axum to 0.7.5
Mar 25, 2024
renovate
bot
force-pushed
the
renovate/axum-0.x
branch
from
May 5, 2024 11:54
138ec6f
to
095d84c
Compare
renovate
bot
changed the title
fix(deps): update rust crate axum to 0.7.5
fix(deps): update rust crate axum to 0.7.0
May 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
None yet
0 participants
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.4.3
->0.7.0
Release Notes
tokio-rs/axum (axum)
v0.7.7
: axum v0.7.7Compare Source
rustdoc now generates tables of content in the sidebar (#2921)
v0.7.6
: axum - v0.7.6Compare Source
Arc
during deserialization ofPath
axum::serve::Serve::tcp_nodelay
andaxum::serve::WithGracefulShutdown::tcp_nodelay
(#2653)Router::has_routes
function (#2790)Serve::local_addr
andWithGracefulShutdown::local_addr
functions (#2881)v0.7.5
: axum - v0.7.5Compare Source
axum::serve
directly witha
Router
orMethodRouter
(#2586)h2
is no longer pulled as a dependency unless thehttp2
featureis enabled (#2605)
v0.7.4
: axum - v0.7.4Compare Source
debug_handler
on tuple response types (#2201)must_use
attribute toServe
andWithGracefulShutdown
(#2484)axum_core::body::BodyDataStream
from axumv0.7.3
: axum - v0.7.3Compare Source
Body
implementsFrom<()>
now (#2411)tracing
feature by default (#2460)serve
(#2398)RouterIntoService
implementsClone
(#2456)v0.7.2
: axum - v0.7.2Compare Source
axum::body::to_bytes
(#2373)serve
(#2400)v0.7.1
: axum - v0.7.1Compare Source
v0.7.0
: axum - v0.7.0Compare Source
WebSocketUpgrade::max_send_queue
(i.e. the
B
type param has been removed) (#1751 and #1789):FromRequestParts
FromRequest
HandlerService
HandlerWithoutStateExt
Handler
LayeredFuture
Layered
MethodRouter
Next
RequestExt
RouteFuture
Route
Router
hyper::Body
as that type is removedin hyper 1.0. Instead axum has its own body type at
axum::body::Body
(#1751)extract::BodyStream
has been removed asbody::Body
implements
Stream
andFromRequest
directly (#1751)sse::Event::json_data
to useaxum_core::Error
as its error type (#1762)DefaultOnFailedUpdgrade
toDefaultOnFailedUpgrade
(#1664)OnFailedUpdgrade
toOnFailedUpgrade
(#1664)TypedHeader
has been move toaxum-extra
(#1850)Empty
andFull
. Useaxum::body::Body::empty
andaxum::body::Body::from
respectively (#1789)IntoResponse::into_response
must useaxum::body::Body
as the body type.axum::response::Response
does this(#1789)
BoxBody
type alias and itsbox_body
constructor. Use
axum::body::Body::new
instead (#1789)RawBody
extractor.axum::body::Body
implementsFromRequest
directly (#1789)http-body
no longer implementIntoResponse
:Full
, useBody::from
insteadEmpty
, useBody::empty
insteadBoxBody
, useBody::new
insteadUnsyncBoxBody
, useBody::new
insteadMapData
, useBody::new
insteadMapErr
, useBody::new
insteadaxum::extract::Request
type alias where the body isaxum::body::Body
(#1789)Router::as_service
andRouter::into_service
to workaroundtype inference issues when calling
ServiceExt
methods on aRouter
(#1835)axum::Server
as it was removed in hyper 1.0. Insteaduse
axum::serve(listener, service)
or hyper/hyper-util for more configuration options (#1868)Router::nest
.Routers nested with
Router::nest_service
will no longer inherit fallbacks (#1956)Sec-WebSocket-Key
header inWebSocketUpgrade
(#1972)axum::extract::Query::try_from_uri
(#2058)IntoResponse
forBox<str>
andBox<[u8]>
([#2035])MethodFilter
. It no longer uses bitflags (#2073).source()
of composite rejections (#2030)#[debug_handler]
(#2014)IntoResponse
for(R,) where R: IntoResponse
(#2143)NestedPath
extractor (#1924)handle_error
function to existingServiceExt
trait (#2235)impl<T> IntoResponse(Parts) for Extension<T>
now requiresT: Clone
, as that is required by the http crate (#1882)axum::Json::from_bytes
(#2244)FromRequestParts
forhttp::request::Parts
(#2328)FromRequestParts
forhttp::Extensions
(#2328)DefaultBodyLimit
to individual routes (#2157)v0.6.20
: axum - v0.6.20Compare Source
WebSocketUpgrade::write_buffer_size
andWebSocketUpgrade::max_write_buffer_size
WebSocketUpgrade::max_send_queue
Handler
forT: IntoResponse
(#2140)v0.6.19
: axum - v0.6.19Compare Source
axum::extract::Query::try_from_uri
(#2058)IntoResponse
forBox<str>
andBox<[u8]>
(#2035).source()
of composite rejections (#2030)#[debug_handler]
(#2014)v0.6.18
: axum - v0.6.18Compare Source
Sec-WebSocket-Key
header inWebSocketUpgrade
(#1972)v0.6.17
: axum - v0.6.17Compare Source
CONNECT
requests (#1958)v0.6.16
: axum - v0.6.16Compare Source
MatchedPath
in fallbacks (#1934)Router
with something nested at/
was used as a fallback (#1934)Router::new().fallback(...)
isn't optimal (#1940)v0.6.15
: axum - v0.6.15Compare Source
v0.6.14
: axum - v0.6.14Compare Source
v0.6.13
: axum - v0.6.13Compare Source
axum::rejection=trace
target (#1890)Router::nest
introduced in0.6.0.
nest
now flattens the routes which performs better (#1711)MatchedPath
in nested handlers now gives the fullmatched path, including the nested path (#1711)
Deref
andDerefMut
for built-in extractors (#1922)v0.6.12
: axum - v0.6.12Compare Source
IntoResponse
forMultipartError
(#1861)v0.6.11
: axum - v0.6.11Compare Source
S: Debug
forimpl Debug for Router<S>
(#1836)v0.6.10
: axum - v0.6.10Compare Source
#[must_use]
attributes to types that do nothing unless used (#1809)TypedHeader
extractor (#1810)Router
via a dynamic library (#1806)v0.6.9
: axum - v0.6.9Compare Source
v0.6.8
: axum - v0.6.8Compare Source
Allow
missing from routers with middleware (#1773)KeepAlive::event
for customizing the event sent for SSE keep alive (#1729)v0.6.7
: axum - v0.6.7Compare Source
FormRejection::FailedToDeserializeFormBody
which is returnedif the request body couldn't be deserialized into the target type, as opposed
to
FailedToDeserializeForm
which is only for query parameters (#1683)MockConnectInfo
for settingConnectInfo
during tests (#1767)v0.6.6
: axum - v0.6.6Compare Source
MethodRouter
toRouter::fallback
(#1730)v0.6.5
: axum - v0.6.5Compare Source
#[debug_handler]
sometimes giving wrong borrow related suggestions (#1710)impl IntoResponse
as the return type from handler functions (#1736)v0.6.4
: axum - v0.6.4Compare Source
v0.6.3
: axum - v0.6.3Compare Source
IntoResponse
for&'static [u8; N]
and[u8; N]
(#1690)Path
support types usingserde::Deserializer::deserialize_any
(#1693)RawPathParams
(#1713)Clone
andService
foraxum::middleware::Next
(#1712)v0.6.2
: axum - v0.6.2Compare Source
body_text
andstatus
methods to built-in rejections (#1612)runtime
feature ofhyper
when usingtokio
(#1671)v0.6.1
: axum - v0.6.1Compare Source
Router::with_state
(#1580)v0.6.0
: axum - v0.6.0Compare Source
Routing
fixed: Nested routers are now allowed to have fallbacks (#1521):
The outer router's fallback will still apply if a nested router doesn't have
its own fallback:
breaking: The request
/foo/
no longer matches/foo/*rest
. If you wantto match
/foo/
you have to add a route specifically for that (#1086)For example:
breaking: Path params for wildcard routes no longer include the prefix
/
. e.g./foo.js
will match/*filepath
with a value offoo.js
, not/foo.js
(#1086)For example:
fixed: Routes like
/foo
and/*rest
are no longer consideredoverlapping.
/foo
will take priority (#1086)For example:
breaking: Automatic trailing slash redirects have been removed.
Previously if you added a route for
/foo
, axum would redirect calls to/foo/
to/foo
(or vice versa for/foo/
):Either explicitly add routes for
/foo
and/foo/
or useaxum_extra::routing::RouterExt::route_with_tsr
if you want the old behavior(#1119)
breaking:
Router::fallback
now only acceptsHandler
s (similarly towhat
get
,post
, etc. accept). Use the newRouter::fallback_service
forsetting any
Service
as the fallback (#1155)This fallback on 0.5:
Becomes this in 0.6
changed:
Router::nest
now only acceptsRouter
s, the general-purposeService
nesting method has been renamed tonest_service
(#1368)breaking: Allow
Error: Into<Infallible>
forRoute::{layer, route_layer}
(#924)breaking:
MethodRouter
now panics on overlapping routes (#1102)breaking:
Router::route
now only acceptsMethodRouter
s created withget
,post
, etc. Use the newRouter::route_service
for routing toany
Service
s (#1155)breaking: Adding a
.route_layer
onto aRouter
orMethodRouter
without any routes will now result in a panic. Previously, this just did
nothing. #1327
breaking:
RouterService
has been removed sinceRouter
now implementsService
when the state is()
. UseRouter::with_state
to provide thestate and get a
Router<()>
. Note thatRouterService
only existed in thepre-releases, not 0.5 (#1552)
Extractors
added: Added new type safe
State
extractor. This can be used withRouter::with_state
and gives compile errors for missing states, whereasExtension
would result in runtime errors (#1155)We recommend migrating from
Extension
toState
for sharing application state since that is more typesafe and faster. That is done by using
Router::with_state
andState
.This setup in 0.5
Becomes this in 0.6 using
State
:If you have multiple extensions, you can use fields on
AppState
and implementFromRef
:breaking: It is now only possible for one extractor per handler to consume
the request body. In 0.5 doing so would result in runtime errors but in 0.6 it
is a compile error (#1272)
axum enforces this by only allowing the last extractor to consume the
request.
For example:
This is done by reworking the
FromRequest
trait and introducing a newFromRequestParts
trait.If your extractor needs to consume the request body then you should implement
FromRequest
, otherwise implementFromRequestParts
.This extractor in 0.5:
Becomes this in 0.6:
For an example of how to write an extractor that accepts different
Content-Types
see the [parse-body-based-on-content-type
][parse-body-based-on-content-type] example.added:
FromRequest
andFromRequestParts
derive macro re-exports fromaxum-macros
behind themacros
feature (#1352)added: Add
RequestExt
andRequestPartsExt
which adds conveniencemethods for running extractors to
http::Request
andhttp::request::Parts
(#1301)added:
JsonRejection
now displays the path at which a deserializationerror occurred (#1371)
added: Add
extract::RawForm
for accessing raw urlencoded query bytes or request body (#1487)fixed: Used
400 Bad Request
forFailedToDeserializeQueryString
rejections, instead of
422 Unprocessable Entity
(#1387)changed: The inner error of a
JsonRejection
is nowserde_path_to_error::Error<serde_json::Error>
. Previously it wasserde_json::Error
(#1371)changed: The default body limit now applies to the
Multipart
extractor (#1420)breaking:
ContentLengthLimit
has been removed. UseDefaultBodyLimit
instead (#1400)breaking:
RequestParts
has been removed as part of theFromRequest
rework (#1272)
breaking:
BodyAlreadyExtracted
has been removed (#1272)breaking: The following types or traits have a new
S
type paramwhich represents the state (#1155):
Router
, defaults to()
MethodRouter
, defaults to()
FromRequest
, no defaultHandler
, no defaultbreaking:
MatchedPath
can now no longer be extracted in middleware fornested routes. In previous versions it returned invalid data when extracted
from a middleware applied to a nested router.
MatchedPath
can still beextracted from handlers and middleware that aren't on nested routers (#1462)
breaking: Rename
FormRejection::FailedToDeserializeQueryString
toFormRejection::FailedToDeserializeForm
(#1496)Middleware
middleware::from_fn
functions (#1088)middleware::from_fn_with_state
to enable running extractors that requirestate (#1342)
middleware::from_extractor_with_state
(#1396)map_request
,map_request_with_state
for transforming therequest with an async function (#1408)
map_response
,map_response_with_state
for transforming theresponse with an async function (#1414)
IntoResponse
(#1152)extractor_middleware
which was previously deprecated.Use
axum::middleware::from_extractor
instead (#1077)Handler::layer
to haveInfallible
as the error type (#1152)Misc
simple-router-wasm
examplefor more details (#1382)
ServiceExt
with methods for turning anyService
into aMakeService
similarly toRouter::into_make_service
(#1302)From
impls have been added toextract::ws::Message
to be more inline with
tungstenite
(#1421)#[derive(axum::extract::FromRef)]
(#1430)accept_unmasked_frames
setting in WebSocketUpgrade (#1529)WebSocketUpgrade::on_failed_upgrade
to customize what to dowhen upgrading a connection fails (#1539)
#[track_caller]
so the errormessage points to where the user added the invalid route, rather than
somewhere internally in axum (#1248)
S: Service
, the bounds have beenrelaxed so the response type must implement
IntoResponse
rather than being aliteral
Response
tokio
default feature needed for WASM support. If youdon't need WASM support but have
default_features = false
for other reasonsyou likely need to re-enable the
tokio
feature (#1382)handler::{WithState, IntoService}
are merged into one type,named
HandlerService
(#1418)v0.5.17
: axum - v0.5.17Compare Source
#[track_caller]
so the errormessage points to where the user added the invalid router, rather than
somewhere internally in axum (#1248)
Multipart
extractor work withRequestBodyLimit
middleware (#1379)DefaultBodyLimit::max
for changing the default body limit (#1397)v0.5.16
: axum - v0.5.16Compare Source
Security
breaking: Added default limit to how much data
Bytes::from_request
willconsume. Previously it would attempt to consume the entire request body
without checking its length. This meant if a malicious peer sent an large (or
infinite) request body your server might run out of memory and crash.
The default limit is at 2 MB and can be disabled by adding the new
DefaultBodyLimit::disable()
middleware. See its documentation for moredetails.
This also applies to these extractors which used
Bytes::from_request
internally:
Form
Json
String
Thanks to Shachar Menashe for reporting this vulnerability.
(#1346)
v0.5.15
: axum - v0.5.15Compare Source
Note: This is a re-release of 0.5.14 that fixes an accidental breaking change.
QueryRejection
response. (#1171)v0.5.14
: axum - v0.5.14Compare Source
Yanked, as it contained an accidental breaking change.
v0.5.13
: axum - v0.5.13Compare Source
WebSocketUpgrade
cannot upgrade the connection it will return aWebSocketUpgradeRejection::ConnectionNotUpgradable
rejection (#1135)WebSocketUpgradeRejection
has a new variantConnectionNotUpgradable
variant (#1135)
v0.5.12
: axum - v0.5.12Compare Source
debug_handler
which is an attribute macro that improvestype errors when applied to handler function. It is re-exported from
axum-macros
(#1144)v0.5.11
: axum - v0.5.11Compare Source
TryFrom<http:: Method>
forMethodFilter
and use newNoMatchingMethodFilter
error in case of failure (#1130)v0.5.10
: axum - v0.5.10Compare Source
Router
cheaper to clone (#1123)v0.5.9
: axum - v0.5.9Compare Source
headers
is enabled and theform
feature is disabled (#1107)
v0.5.8
: axum - v0.5.8Compare Source
Forwarded
header inHost
extractor (#1078)
IntoResponse
forForm
(#1095)v0.5.7
: axum - v0.5.7Compare Source
Default
forExtension
(#1043)Vec<(String, String)>
inextract::Path<_>
to get vector ofkey/value pairs (#1059)
extract::ws::close_code
which contains constants for close codes (#1067)impl IntoResponse
less in docs (#1049)v0.5.6
: axum - v0.5.6Compare Source
WebSocket::protocol
to return the selected WebSocket subprotocol, if there is one. (#1022)PathRejection::WrongNumberOfParameters
to hint at usingPath<(String, String)>
orPath<SomeStruct>
(#1023)PathRejection::WrongNumberOfParameters
now uses500 Internal Server Error
sinceit's a programmer error and not a client error (#1023)
InvalidFormContentType
mentioning the wrong content typev0.5.5
: axum - v0.5.5Compare Source
GET
,HEAD
, andOPTIONS
requests inContentLengthLimit
.Request with these methods are now accepted if they do not have a
Content-Length
header, andthe request body will not be checked. If they do have a
Content-Length
header they'll berejected. This allows
ContentLengthLimit
to be used as middleware around several routes,including
GET
routes (#989)MethodRouter::{into_make_service, into_make_service_with_connect_info}
(#1010)v0.5.4
: axum - v0.5.4Compare Source
response::ErrorResponse
andresponse::Result
forIntoResponse
-based error handling (#921)middleware::from_extractor
and deprecateextract::extractor_middleware
(#957)v0.5.3
: axum - v0.5.3Compare Source
AppendHeaders
for appending headers to a response rather than overriding them (#927)axum::extract::multipart::Field::chunk
method for streaming a single chunk fromthe field (#901)
v0.5.2
: axum - v0.5.2Compare Source
Yanked, as it contained an accidental breaking change.
v0.5.1
: axum - v0.5.1Compare Source
RequestParts::extract
which allows applying an extractor as a method call ([#897)v0.5.0
: axum - v0.5.0Compare Source
added: Document sharing state between handler and middleware (#783)
added:
Extension<_>
can now be used in tuples for building responses, and will set anextension on the response (#797)
added:
extract::Host
for extracting the hostname of a request (#827)added: Add
IntoResponseParts
trait which allows defining custom responsetypes for adding headers or extensions to responses (#797)
added:
TypedHeader
implements the newIntoResponseParts
trait so theycan be returned from handlers as parts of a response (#797)
changed:
Router::merge
now acceptsInto<Router>
(#819)breaking:
sse::Event
now accepts types implementingAsRef<str>
instead ofInto<String>
as field values.
breaking:
sse::Event
now panics if a setter method is called twice instead of silentlyoverwriting old values.
breaking: Require
Output = ()
onWebSocketStream::on_upgrade
(#644)breaking: Make
TypedHeaderRejectionReason
#[non_exhaustive]
(#665)breaking: Using
HeaderMap
as an extractor will no longer remove the headers and thusthey'll still be accessible to other extractors, such as
axum::extract::Json
. InsteadHeaderMap
will clone the headers. You should prefer to useTypedHeader
to extract only theheaders you need (#698)
This includes these breaking changes:
RequestParts::take_headers
has been removed.RequestParts::headers
returns&HeaderMap
.RequestParts::headers_mut
returns&mut HeaderMap
.HeadersAlreadyExtracted
has been removed.HeadersAlreadyExtracted
variant has been removed from these rejections:RequestAlreadyExtracted
RequestPartsAlreadyExtracted
JsonRejection
FormRejection
ContentLengthLimitRejection
WebSocketUpgradeRejection
<HeaderMap as FromRequest<_>>::Rejection
has been changed tostd::convert::Infallible
.breaking:
axum::http::Extensions
is no longer an extractor (ie itdoesn't implement
FromRequest
). Theaxum::extract::Extension
extractor isnot impacted by this and works the same. This change makes it harder to
accidentally remove all extensions which would result in confusing errors
elsewhere (#699)
This includes these breaking changes:
RequestParts::take_extensions
has been removed.RequestParts::extensions
returns&Extensions
.RequestParts::extensions_mut
returns&mut Extensions
.RequestAlreadyExtracted
has been removed.<Request as FromRequest>::Rejection
is nowBodyAlreadyExtracted
.<http::request::Parts as FromRequest>::Rejection
is nowInfallible
.ExtensionsAlreadyExtracted
has been removed.ExtensionsAlreadyExtracted
removed variant has been removed from these rejections:ExtensionRejection
PathRejection
MatchedPathRejection
WebSocketUpgradeRejection
breaking:
Redirect::found
has been removed (#800)breaking:
AddExtensionLayer
has been removed. UseExtension
instead. It now implementstower::Layer
(#807)breaking:
AddExtension
has been moved from the root module tomiddleware
breaking:
.nest("/foo/", Router::new().route("/bar", _))
now does the right thing andresults in a route at
/foo/bar
instead of/foo//bar
(#824)breaking: Routes are now required to start with
/
. Previously routes such as:foo
wouldbe accepted but most likely result in bugs (#823)
breaking:
Headers
has been removed. Arrays of tuples directly implementIntoResponseParts
so([("x-foo", "foo")], response)
now works (#797)breaking:
InvalidJsonBody
has been replaced withJsonDataError
to clearly signal that therequest body was syntactically valid JSON but couldn't be deserialized into the target type
breaking:
Handler
is no longer an#[async_trait]
but instead has anassociated
Future
type. That allows users to build their ownHandler
typeswithout paying the cost of
#[async_trait]
(#879)changed: New
JsonSyntaxError
variant added toJsonRejection
. This is returned when therequest body contains syntactically invalid JSON
fixed: Correctly set the
Content-Length
header for response toHEAD
requests (#734)
fixed: Fix wrong
content-length
forHEAD
requests to endpoints that returns chunkedresponses (#755)
fixed: Fixed several routing bugs related to nested "opaque" tower services (i.e.
non-
Router
services) (#841 and #842)changed: Update to tokio-tungstenite 0.17 (#791)
breaking:
Redirect::{to, temporary, permanent}
now accept&str
insteadof
Uri
(#889)breaking: Remove second type parameter from
Router::into_make_service_with_connect_info
and
Handler::into_make_service_with_connect_info
to supportMakeService
sthat accept multiple targets (#892)
v0.4.8
Compare Source
v0.4.7
: axum - v0.4.7Compare Source
tower::Layer
forExtension
(#801)AddExtensionLayer
. UseExtension
instead (#805)v0.4.6
: axum - v0.4.6Compare Source
middleware::from_fn
for creating middleware from async functions.This previously lived in axum-extra but has been moved to axum (#719)
Allow
header when responding with405 Method Not Allowed
(#733)v0.4.5
: v0.4.5Compare Source
axum-macros and is deprecated (#738)
v0.4.4
: v0.4.4Compare Source
Router
s at/
(#691)nest("", service)
work and mean the same asnest("/", service)
(#691)301
with308
for trailing slash redirects. Also deprecatesRedirect::found
(302
) in favor ofRedirect::temporary
(307
) orRedirect::to
(303
).This is to prevent clients from changing non-
GET
requests toGET
requests (#682)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.