Changelog History
Page 1
-
v4.0.0-beta.9 Changes
September 09, 2021โ Added
- Re-export actix-service
ServiceFactory
indev
module. [#2325]
๐ Changed
- Compress middleware will return 406 Not Acceptable when no content encoding is acceptable to the client. [#2344]
- ๐ Move
BaseHttpResponse
todev::Response
. [#2379] - โ
Enable
TestRequest::param
to accept more than just static strings. [#2172] - ๐ Minimum supported Rust version (MSRV) is now 1.51.
๐ Fixed
- ๐ Fix quality parse error in Accept-Encoding header. [#2344]
- ๐ Re-export correct type at
web::HttpResponse
. [#2379]
๐ [#2172]: https://github.com/actix/actix-web/pull/2172 ๐ [#2325]: https://github.com/actix/actix-web/pull/2325 ๐ [#2344]: https://github.com/actix/actix-web/pull/2344 ๐ [#2379]: https://github.com/actix/actix-web/pull/2379
- Re-export actix-service
-
v4.0.0-beta.8 Changes
June 26, 2021โ Added
- โ Add
ServiceRequest::parts_mut
. [#2177] - โ Add extractors for
Uri
andMethod
. [#2263] - โ Add extractors for
ConnectionInfo
andPeerAddr
. [#2263] - โ Add
Route::service
for using hand-written services as handlers. [#2262]
๐ Changed
- ๐ Change compression algorithm features flags. [#2250]
- ๐ Deprecate
App::data
andApp::data_factory
. [#2271] - Smarter extraction of
ConnectionInfo
parts. [#2282]
๐ Fixed
- Scope and Resource middleware can access data items set on their own layer. [#2288]
๐ [#2177]: https://github.com/actix/actix-web/pull/2177 ๐ [#2250]: https://github.com/actix/actix-web/pull/2250 ๐ [#2271]: https://github.com/actix/actix-web/pull/2271 ๐ [#2262]: https://github.com/actix/actix-web/pull/2262 ๐ [#2263]: https://github.com/actix/actix-web/pull/2263 ๐ [#2282]: https://github.com/actix/actix-web/pull/2282 ๐ [#2288]: https://github.com/actix/actix-web/pull/2288
- โ Add
-
v4.0.0-beta.7 Changes
June 17, 2021โ Added
HttpServer::worker_max_blocking_threads
for setting block thread pool. [#2200]
๐ Changed
- ๐ฐ Adjusted default JSON payload limit to 2MB (from 32kb) and included size and limits in the
JsonPayloadError::Overflow
error variant. [#2162] ๐ [#2162]: (https://github.com/actix/actix-web/pull/2162) ServiceResponse::error_response
now uses body type ofBody
. [#2201]ServiceResponse::checked_expr
now returns aResult
. [#2201]- โก๏ธ Update
language-tags
to0.3
. ServiceResponse::take_body
. [#2201]ServiceResponse::map_body
closure receives and returnsB
instead ofResponseBody<B>
types. [#2201]- ๐ All error trait bounds in server service builders have changed from
Into<Error>
toInto<Response<AnyBody>>
. [#2253] - All error trait bounds in message body and stream impls changed from
Into<Error>
toInto<Box<dyn std::error::Error>>
. [#2253] HttpServer::{listen_rustls(), bind_rustls()}
now honor the ALPN protocols in the configuation parameter. [#2226]middleware::normalize
now will not try to normalize URIs with no valid path [#2246]
โ Removed
HttpResponse::take_body
and oldHttpResponse::into_body
method that casted body type. [#2201]
๐ [#2200]: https://github.com/actix/actix-web/pull/2200 ๐ [#2201]: https://github.com/actix/actix-web/pull/2201 ๐ [#2253]: https://github.com/actix/actix-web/pull/2253 ๐ [#2246]: https://github.com/actix/actix-web/pull/2246
-
v4.0.0-beta.6 Changes
April 17, 2021โ Added
HttpResponse
andHttpResponseBuilder
structs. [#2065]
๐ Changed
- Most error types are now marked
#[non_exhaustive]
. [#2148] - Methods on
ContentDisposition
that tookT: AsRef<str>
now takeimpl AsRef<str>
.
๐ [#2065]: https://github.com/actix/actix-web/pull/2065 ๐ [#2148]: https://github.com/actix/actix-web/pull/2148
-
v4.0.0-beta.5 Changes
April 02, 2021โ Added
Header
extractor for extracting common HTTP headers in handlers. [#2094]- โ Added
TestServer::client_headers
method. [#2097]
๐ Fixed
- Double ampersand in Logger format is escaped correctly. [#2067]
๐ Changed
CustomResponder
would return error asHttpResponse
whenCustomResponder::with_header
failed instead of skipping. (Only the first error is kept when multiple error occur) [#2093]
โ Removed
- ๐ The
client
mod was removed. Clients should now useawc
directly. 871ca5e4 - ๐ Integration testing was moved to new
actix-test
crate. Namely these items from thetest
module:TestServer
,TestServerConfig
,start
,start_with
, andunused_addr
. [#2112]
๐ [#2067]: https://github.com/actix/actix-web/pull/2067 ๐ [#2093]: https://github.com/actix/actix-web/pull/2093 ๐ [#2094]: https://github.com/actix/actix-web/pull/2094 ๐ [#2097]: https://github.com/actix/actix-web/pull/2097 ๐ [#2112]: https://github.com/actix/actix-web/pull/2112
-
v4.0.0-beta.4 Changes
March 09, 2021๐ Changed
- ๐ Feature
cookies
is now optional and enabled by default. [#1981] - 0๏ธโฃ
JsonBody::new
returns a default limit of 32kB to be consistent withJsonConfig
and the default behaviour of theweb::Json<T>
extractor. [#2010]
๐ [#1981]: https://github.com/actix/actix-web/pull/1981 ๐ [#2010]: https://github.com/actix/actix-web/pull/2010
- ๐ Feature
-
v4.0.0-beta.3 Changes
February 10, 2021- โก๏ธ Update
actix-web-codegen
to0.5.0-beta.1
.
- โก๏ธ Update
-
v4.0.0-beta.21 Changes
January 21, 2022โ Added
HttpResponse::add_removal_cookie
. [#2586]Logger::log_target
. [#2594]
โ Removed
HttpRequest::req_data[_mut]()
; request-local data is still available through.extensions()
. [#2585]HttpRequestBuilder::del_cookie
. [#2591]
๐ [#2585]: https://github.com/actix/actix-web/pull/2585 ๐ [#2586]: https://github.com/actix/actix-web/pull/2586 ๐ [#2591]: https://github.com/actix/actix-web/pull/2591 ๐ [#2594]: https://github.com/actix/actix-web/pull/2594
-
v4.0.0-beta.20 Changes
January 14, 2022โ Added
GuardContext::header
[#2569]- ๐ง
ServiceConfig::configure
to allow easy nesting of configuration functions. [#1988]
๐ Changed
HttpResponse
can now be used as aResponder
with any body type. [#2567]Result
extractor wrapper can now convert error types. [#2581]- Associated types in
FromRequest
impl forOption
andResult
has changed. [#2581] - Maximum number of handler extractors has increased to 12. [#2582]
- โ Removed bound
<B as MessageBody>::Error: Debug
in test utility functions in order to support returning opaque apps. [#2584]
๐ [#1988]: https://github.com/actix/actix-web/pull/1988 ๐ [#2567]: https://github.com/actix/actix-web/pull/2567 ๐ [#2569]: https://github.com/actix/actix-web/pull/2569 ๐ [#2581]: https://github.com/actix/actix-web/pull/2581 ๐ [#2582]: https://github.com/actix/actix-web/pull/2582 ๐ [#2584]: https://github.com/actix/actix-web/pull/2584
-
v4.0.0-beta.2 Changes
February 10, 2021โ Added
- ๐ The method
Either<web::Json<T>, web::Form<T>>::into_inner()
which returns the inner type for whichever variant was created. Also works forEither<web::Form<T>, web::Json<T>>
. [#1894] - โ Add
services!
macro for helping register multiple services toApp
. [#1933] - Enable registering a vec of services of the same type to
App
[#1933]
๐ Changed
- ๐ Rework
Responder
trait to be sync and returnsResponse
/HttpResponse
directly. Making it simpler and more performant. [#1891] ServiceRequest::into_parts
andServiceRequest::from_parts
can no longer fail. [#1893]ServiceRequest::from_request
can no longer fail. [#1893]- Our
Either
type now usesLeft
/Right
variants (instead ofA
/B
) [#1894] test::{call_service, read_response, read_response_json, send_request}
take&Service
in argument [#1905]App::wrap_fn
,Resource::wrap_fn
andScope::wrap_fn
provide&Service
in closure argument. [#1905]- ๐
web::block
no longer requires the output is a Result. [#1957]
๐ Fixed
- โ
Multiple calls to
App::data
with the same type now keeps the latest call's data. [#1906]
โ Removed
- ๐ Public field of
web::Path
has been made private. [#1894] - ๐ Public field of
web::Query
has been made private. [#1894] - โ
TestRequest::with_header
; useTestRequest::default().insert_header()
. [#1869] AppService::set_service_data
; for custom HTTP service factories adding application data, use the layered data model by callingServiceRequest::add_data_container
when handling requests instead. [#1906]
๐ [#1891]: https://github.com/actix/actix-web/pull/1891 ๐ [#1893]: https://github.com/actix/actix-web/pull/1893 ๐ [#1894]: https://github.com/actix/actix-web/pull/1894 ๐ [#1869]: https://github.com/actix/actix-web/pull/1869 ๐ [#1905]: https://github.com/actix/actix-web/pull/1905 ๐ [#1906]: https://github.com/actix/actix-web/pull/1906 ๐ [#1933]: https://github.com/actix/actix-web/pull/1933 ๐ [#1957]: https://github.com/actix/actix-web/pull/1957
- ๐ The method