20 KiB
20 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
0.6.8
Fixed
- Disable
multiple_membersin Gzip decoder, since HTTP context only uses one member. (#621)
0.6.7
Added
TimeoutLayer::with_status_code(status)to define the status code returned when timeout is reached. (#599)
Deprecated
auth::require_authorizationis too basic for real-world. (#591)TimeoutLayer::new()should be replaced withTimeoutLayer::with_status_code(). (Previously wasStatusCode::REQUEST_TIMEOUT) (#599)
Fixed
on_eosis now called even for successful responses. (#580)ServeDir: call fallback when filename is invalid (#586)decompressionwill not fail when body is empty (#618)
0.6.6
Fixed
- compression: fix panic when looking in vary header (#578)
0.6.5
Added
- normalize_path: add
append_trailing_slash()mode (#547)
Fixed
- redirect: remove payload headers if redirect changes method to GET (#575)
- compression: avoid setting
vary: accept-encodingif already set (#572)
0.6.4
Added
- decompression: Support HTTP responses containing multiple ZSTD frames (#548)
- The
ServiceExttrait for chaining layers onto an arbitrary http service just likeServiceBuilderExtallows forServiceBuilder(#563)
Fixed
- Remove unnecessary trait bounds on
S::ErrorforServiceimpls ofRequestBodyTimeout<S>andResponseBodyTimeout<S>(#533) - compression: Respect
is_end_stream(#535) - Fix a rare panic in
fs::ServeDir(#553) - Fix invalid
content-lenghtof 1 in response to range requests to empty files (#556) - In
AsyncRequireAuthorization, use the original inner service after it is ready, instead of using a clone (#561)
0.6.3
This release was yanked because its definition of ServiceExt was quite unhelpful, in a way that's very unlikely that anybody would start depending on within the small timeframe before this was yanked, but that was technically breaking to change.
0.6.2
Changed:
CompressionBody<B>now propagatesB's size hint in itshttp_body::Bodyimplementation, if compression is disabled (#531)- this allows a
content-lengthto be included in an HTTP message with this body for those cases
- this allows a
0.6.1
Fixed
- decompression: reuse scratch buffer to significantly reduce allocations and improve performance (#521)
0.6.0
Changed:
bodymodule is disabled except forcatch-panic,decompression-*,fs, orlimitfeatures (BREAKING) (#477)- Update to
tower0.5 (#503)
Fixed
- fs: Precompression of static files now supports files without a file extension (#507)
0.5.2
Added:
- compression: Will now send a
vary: accept-encodingheader on compressed responses (#399) - compression: Support
x-gzipas equivalent togzipinaccept-encodingrequest header (#467)
Fixed
- compression: Skip compression for range requests (#446)
- compression: Skip compression for SSE responses by default (#465)
- cors: Actually keep Vary headers set by the inner service when setting response headers (#473)
- Version 0.5.1 intended to ship this, but the implementation was buggy and didn't actually do anything
0.5.1 (January 14, 2024)
Added
- fs: Support files precompressed with
zstdinServeFile - trace: Add default generic parameters for
ResponseBodyandResponseFuture(#455) - trace: Add type aliases
HttpMakeClassifierandGrpcMakeClassifier(#455)
Fixed
- cors: Keep Vary headers set by the inner service when setting response headers (#398)
- fs:
ServeDirnow no longer redirects from/directoryto/directory/ifappend_index_html_on_directoriesis disabled (#421)
0.5.0 (November 21, 2023)
Changed
- Bump Minimum Supported Rust Version to 1.66 (#433)
- Update to http-body 1.0 (#348)
- Update to http 1.0 (#348)
- Preserve service error type in RequestDecompression (#368)
Fixed
- Accepts range headers with ranges where the end of range goes past the end of the document by bumping
http-range-header to
0.4
0.4.2 (July 19, 2023)
Added
- cors: Add support for private network preflights (#373)
- compression: Implement
DefaultforDecompressionBody(#370)
Changed
- compression: Update to async-compression 0.4 (#371)
Fixed
- compression: Override default brotli compression level 11 -> 4 (#356)
- trace: Simplify dynamic tracing level application (#380)
- normalize_path: Fix path normalization for preceding slashes (#359)
0.4.1 (June 20, 2023)
Added
- request_id: Derive
DefaultforMakeRequestUuid(#335) - fs: Derive
DefaultforServeFileSystemResponseBody(#336) - compression: Expose compression quality on the CompressionLayer (#333)
Fixed
- compression: Improve parsing of
Accept-Encodingrequest header (#220) - normalize_path: Fix path normalization of index route (#347)
- decompression: Enable
multiple_membersforGzipDecoder(#354)
0.4.0 (February 24, 2023)
Added
- decompression: Add
RequestDecompressionmiddleware (#282) - compression: Implement
DefaultforCompressionBody(#323) - compression, decompression: Support zstd (de)compression (#322)
Changed
- serve_dir:
ServeDirandServeFile's error types are nowInfallibleand any IO errors will be converted into responses. Usetry_callto generate error responses manually (BREAKING) (#283) - serve_dir:
ServeDir::fallbackandServeDir::not_found_servicenow requires the fallback service to useInfallibleas its error type (BREAKING) (#283) - compression, decompression: Tweak prefered compression encodings (#325)
Removed
- Removed
RequireAuthorizationin favor ofValidateRequest(BREAKING) (#290)
Fixed
- serve_dir: Don't include identity in Content-Encoding header (#317)
- compression: Do compress SVGs (#321)
- serve_dir: In
ServeDir, convertio::ErrorKind::NotADirectoryto404 Not Found(#331)
0.3.5 (December 02, 2022)
Added
- Add
NormalizePathmiddleware (#275) - Add
ValidateRequestmiddleware (#289) - Add
RequestBodyTimeoutmiddleware (#303)
Changed
- Bump Minimum Supported Rust Version to 1.60 (#299)
Fixed
- trace: Correctly identify gRPC requests in default
on_responsecallback (#278) - cors: Panic if a wildcard (
*) is passed toAllowOrigin::list. UseAllowOrigin::any()instead (#285) - serve_dir: Call the fallback on non-uft8 request paths (#310)
0.3.4 (June 06, 2022)
Added
0.3.3 (May 08, 2022)
Added
- serve_dir: Add
ServeDir::call_fallback_on_method_not_allowedto allow calling the fallback for requests that aren'tGETorHEAD(#264) - request_id: Add
MakeRequestUuidfor generating request ids using UUIDs (#266)
Fixed
- serve_dir: Include
Allowheader for405 Method Not Allowedresponses (#263)
0.3.2 (April 29, 2022)
Fixed
- serve_dir: Fix empty request parts being passed to
ServeDir's fallback instead of the actual ones (#258)
0.3.1 (April 28, 2022)
Fixed
- cors: Only send a single origin in
Access-Control-Allow-Originheader when a list of allowed origins is configured (the previous behavior of sending a comma-separated list like for allowed methods and allowed headers is not allowed by any standard)
0.3.0 (April 25, 2022)
Added
- fs: Add
ServeDir::{fallback, not_found_service}for calling another service if the file cannot be found (#243) - fs: Add
SetStatusto override status codes (#248) ServeDirandServeFilenow respond with405 Method Not Allowedto requests where the method isn'tGETorHEAD(#249)- cors: Added
CorsLayer::very_permissivewhich is likeCorsLayer::permissiveexcept it (truly) allows credentials. This is made possible by mirroring the request's origin as well as method and headers back as CORS-whitelisted ones (#237) - cors: Allow customizing the value(s) for the
Varyheader (#237)
Changed
- cors: Removed
allow-credentials: truefromCorsLayer::permissive. It never actually took effect in compliant browsers because it is mutually exclusive with the*wildcard (Any) on origins, methods and headers (#237) - cors: Rewrote the CORS middleware. Almost all existing usage patterns will continue to work. (BREAKING) (#237)
- cors: The CORS middleware will now panic if you try to use
Anyin combination with.allow_credentials(true). This configuration worked before, but resulted in browsers ignoring theallow-credentialsheader, which defeats the purpose of setting it and can be very annoying to debug (#237)
Fixed
- fs: Fix content-length calculation on range requests (#228)
0.2.4 (March 5, 2022)
Added
- Added
CatchPanicmiddleware which catches panics and converts them into500 Internal Serverresponses (#214)
Fixed
- Make parsing of
Accept-Encodingmore robust (#220)
0.2.3 (February 18, 2022)
Changed
- Update to tokio-util 0.7 (#221)
Fixed
- The CORS layer / service methods
allow_headers,allow_methods,allow_originandexpose_headersnow do nothing if given an emptyVec, instead of sending the respective header with an empty value (#218)
0.2.2 (February 8, 2022)
Fixed
- Add
Varyheaders for CORS preflight responses (#216)
0.2.1 (January 21, 2022)
Added
- Support
Last-Modified(and friends) headers inServeDirandServeFile(#145) - Add
AsyncRequireAuthorization::layer(#195)
Fixed
- Fix build error for certain feature sets (#209)
Cors: SetVaryheader (#199)ServeDirandServeFile: Fix potential directory traversal attack due to improper path validation on Windows (#204)
0.2.0 (December 1, 2021)
Added
- builder: Add
ServiceBuilderExtwhich adds methods totower::ServiceBuilderfor adding middleware from tower-http (#106) - request_id: Add
SetRequestIdandPropagateRequestIdmiddleware (#150) - trace: Add
DefaultMakeSpan::levelto make log level of tracing spans easily configurable (#124) - trace: Add
LatencyUnit::Secondsfor formatting latencies as seconds (#179) - trace: Support customizing which status codes are considered failures by
GrpcErrorsAsFailures(#189) - compression: Support specifying predicates to choose when responses should
be compressed. This can be used to disable compression of small responses,
responses with a certain
content-type, or something user defined (#172) - fs: Ability to serve precompressed files (#156)
- fs: Support
Rangerequests (#173) - fs: Properly support HEAD requests which return no body and have the
Content-Lengthheader set (#169)
Changed
AddAuthorization,InFlightRequests,SetRequestHeader,SetResponseHeader,AddExtension,MapRequestBodyandMapResponseBodynow requires underlying service to usehttp::Request<ReqBody>andhttp::Response<ResBody>as request and responses (#182) (BREAKING)- set_header: Remove unnecessary generic parameter from
SetRequestHeaderLayerandSetResponseHeaderLayer. This removes the need (and possibility) to specify a body type for these layers (#148) (BREAKING) - compression, decompression: Change the response body error type to
Box<dyn std::error::Error + Send + Sync>. This makes them usable if the body they're wrapping usesBox<dyn std::error::Error + Send + Sync>as its error type which they previously weren't (#166) (BREAKING) - fs: Change response body type of
ServeDirandServeFiletoServeFileSystemResponseBodyandServeFileSystemResponseFuture(#187) (BREAKING) - auth: Change
AuthorizeRequestandAsyncAuthorizeRequesttraits to be simpler (#192) (BREAKING)
Removed
- compression, decompression: Remove
BodyOrIoError. Its been replaced withBox<dyn std::error::Error + Send + Sync>(#166) (BREAKING) - compression, decompression: Remove the
compressionanddecompressionfeature. They were unnecessary andcompression-full/decompression-fullcan be used to get full compression/decompression support. For more granular control,[compression|decompression]-gzip,[compression|decompression]-brand[compression|decompression]-deflatemay be used instead (#170) (BREAKING)
0.1.2 (November 13, 2021)
- New middleware: Add
Corsfor setting CORS headers (#112) - New middleware: Add
AsyncRequireAuthorization(#118) Compression: Don't recompress HTTP responses (#140)CompressionandDecompression: Pass configuration from layer into middleware (#132)ServeDirandServeFile: Improve performance (#137)Compression: Remove needlessResBody::Error: Into<BoxError>bounds (#117)ServeDir: Percent decode path segments (#129)ServeDir: Use correct redirection status (#130)ServeDir: Return404 Not Foundon requests to directories ifappend_index_html_on_directoriesis set tofalse(#122)
0.1.1 (July 2, 2021)
- Add example of using
SharedClassifier. - Add
StatusInRangeAsFailureswhich is a response classifier that considers responses with status code in a certain range as failures. Useful for HTTP clients where both server errors (5xx) and client errors (4xx) are considered failures. - Implement
DebugforNeverClassifyEos. - Update iri-string to 0.4.
- Add
ClassifyResponse::map_failure_classandClassifyEos::map_failure_classfor transforming the failure classification using a function. - Clarify exactly when each
Tracecallback is called. - Add
AddAuthorizationLayerfor setting theAuthorizationheader on requests.
0.1.0 (May 27, 2021)
- Initial release.