1 ### v0.3.7 (April 5, 2024)
4 - Add ecc private key support to `tls()` config.
6 - Several dependency upgrades.
8 ### v0.3.6 (September 27, 2023)
11 - Add ability to pass `None` to `multipart::form().max_length()`.
12 - Implement `Reply` for `Result<impl Reply, impl Reply>`.
13 - Make `multipart::Part::content_type()` return the full mime string.
14 - Add `TlsServer::try_bind_with_graceful_shutdown()`.
16 - Updated tungstenite and rustls dependencies for security fixes.
18 ### v0.3.5 (April 28, 2023)
21 - `multipart` filters now use `multer` dependency, fixing some streaming bugs.
22 - `Rejection::into_response()` is significantly faster.
24 ### v0.3.4 (March 31, 2023)
27 - `multipart::Part` data is now streamed instead of buffered.
28 - Update dependency used for `multipart` filters.
30 ### v0.3.3 (September 27, 2022)
33 - Fix `fs` filters path sanitization to reject colons on Windows.
35 ### v0.3.2 (November 9, 2021)
38 - Add `Filter::then()`, which is like `Filter::map()` in that it's infallible, but is async like `Filter::and_then()`.
39 - Add `redirect::found()` reply helper that returns `302 Found`.
40 - Add `compression-brotli` and `compression-gzip` cargo features to enable only the compression you need.
41 - Allow `HEAD` requests to be served to `fs::dir()` filters.
42 - Allow `path!()` with no arguments.
44 - Update private dependencies Tungstenite and Multipart.
45 - Replaces uses of `futures` with `futures-util`, which is a smaller dependency.
48 ### v0.3.1 (March 24, 2021)
51 - Add `pong` constructor to websocket messages.
52 - Add `redirect::see_other` and `redirect::permanent` helpers.
54 - Fix `fs` filters sometimes having an off-by-one error with range requests.
55 - Fix CORS to allow spaces when checking `Access-Control-Request-Headers`.
57 ## v0.3.0 (January 19, 2021)
60 - Add TLS client authentication support.
61 - Add TLS OCSP stapling support.
62 - Add `From<Reject>` for `Rejection`.
63 - Add `close_frame` accessor to `ws::Message`.
67 - Update to hyper v0.14.
68 - Rework `sse` filter to be more like `ws`, with a single `Event` type and builder.
69 - Change `cookie` filter to extract a generic `FromStr` value.
72 ### v0.2.5 (August 31, 2020)
75 - Add `wrap_fn`, which can be used to create a `Wrap` from a closure. These in turn are used with `Filter::with()`.
76 - Add `warp::host` filters to deal with `Host`/`:authority` headers.
77 - Relax some lifetime bounds on `Server`.
79 - Fix panic when URI doesn't have a slash (for example, `CONNECT foo.bar`).
81 ### v0.2.4 (July 20, 2020)
84 - Add `tracing` internals in place of `log` (log is still emitted for backwards compatibility).
85 - Add `warp::trace` module set of filters to customize `tracing` dianostics.
86 - Add `path` method to `warp::fs::File` reply.
87 - Add `source` implementation for `BodyDeserializeError`.
88 - Make `warp::ws::MissingConnectionUpgrade` rejection public.
90 ### v0.2.3 (May 19, 2020)
93 - Add `warp::compression` filters, which will compress response bodies.
94 - Add `warp::header::value()` filter to get a request `HeaderValue`.
95 - Add `request_headers` method to `warp::log::Info`.
96 - Add `max_frame_size` to `warp::ws::Ws` builder.
97 - Add `remote_addr` to `warp::test::RequestBuilder`.
98 - Add `try_bind_with_graceful_shutdown` to `warp::Server` builder.
99 - Add `serve_incoming_with_graceful_shutdown` to `warp::Server` builder.
101 - Fix `warp::addr::remote` when used with `Server::tls`.
102 - Fix panic in `warp::path::{peek, tail, full}` filters when the request URI is in authority-form or asterisk-form.
104 ### v0.2.2 (March 3, 2020)
107 - Implement `Reply` for all `Box<T>` where `T: Reply`.
108 - Add `name` methods to `MissingHeader`, `InvalidHeader`, and `MissingCookie` rejections.
109 - Add `warp::ext::optional()` filter that optionally retrieves an extension from the request.
111 - Fix the sending of pings when a user sends a `ws::Message::ping()`.
113 ### v0.2.1 (January 23, 2020)
116 - Add `close` and `close_with` constructors to `warp::ws::Message`.
118 - Fix `warp::fs` filters using a very small read buffer.
120 ## v0.2.0 (January 16, 2020)
123 - Update to `std::future`, adding `async`/`await` support!
124 - Add `warp::service()` to convert a `Filter` into a `tower::Service`.
125 - Implement `Reply` for `Box<dyn Reply>`.
127 - Refactored Rejection system (#311).
128 - Change `path!` macro to assume a `path::end()` by default, with explicit `/ ..` to allow building a prefix (#359).
129 - Change `warp::path(str)` to accept any `AsRef<str>` argument.
130 - Rename "2"-suffixed filters and types (`get2` to `get`, `ws2` to `ws`, etc).
131 - `Filter::{or, or_else, recover}` now require `Self::Error=Rejection`. This helps catch filters that didn't make sense (like `warp::any().or(warp::get())`).
132 - Change several `warp::body` filters (#345).
133 - Change `warp::cors()` to return a `warp::cors::Builder` which still implements `Wrap`, but can also `build` a cheaper-to-clone wrapper.
134 - Change `warp::multipart` stream API to allow for errors when streaming.
135 - Change `warp::sse` to no longer return a `Filter`, adds `warp::sse::reply` to do what `Sse::reply` did.
136 - Change `Server::tls()` to return a TLS server builder (#340).
137 - Change internal `warp::never::Never` usage with `std::convert::Infallible`.
138 - Remove `warp::ext::set()` function (#222).
139 - Remove deprecated `warp::cookie::optional_value()`.
142 ### v0.1.20 (September 17, 2019)
145 - Implement `Clone` for the `warp::cors` filter.
146 - Add `into_bytes` method for `warp::ws::Message`.
148 ### v0.1.19 (August 16, 2019)
151 - Make `warp::multipart` and `wrap::ws` support optional, though enabled by default.
153 - Fix `warp::fs::dir` filter to reject paths containing backslashes.
155 ### v0.1.18 (July 25, 2019)
158 - Add `warp::multipart` support.
160 ### v0.1.17 (July 8, 2019)
163 - Export all built-in Rejection causes in the `warp::reject` module.
164 - Add `Server::try_bind` as fallible bind methods.
166 ### v0.1.16 (June 11, 2019)
169 - Unseal the `Reply` trait: custom types can now implement `Reply`.
170 - Add `warp::sse::keep_alive()` replacement for `warp::sse::keep()` which allows customizing keep-alive behavior.
171 - Add `warp::log::Info::host()` accessor.
173 - Fix `warp::fs` filters from sending some headers for `304` responses.
175 ### v0.1.15 (April 2, 2019)
178 - Add more accessors to `warp::log::Info` type for building custom log formats.
179 - Implement `Reply` for `Cow<'static, str>`.
181 ### v0.1.14 (March 19, 2019)
184 - Add `warp::header::optional` filter.
186 ### v0.1.13 (February 13, 2019)
189 - Implement `Reply` for `Vec<u8>` and `&'static [u8]`.
190 - Set `content-type` header automatically for string and bytes replies.
191 - Add `expose_headers` to `warp::cors` filter.
193 ### v0.1.12 (January 29, 2019)
196 - Implement `PartialEq`, `Eq`, and `Clone` for `warp::ws::Message`.
198 - Fix panic when incoming request URI may not have a path (such as `CONNECT` requests).
200 ### v0.1.11 (January 14, 2019)
203 - Add `warp::sse` filters for handling Server-Sent-Events.
204 - Add `allow_headers` to `warp::cors` filter.
206 - Fix TLS handshake to close the connection if handshake fails.
208 ### v0.1.10 (December 17, 2018)
211 - Add optional TLS support. Enable the `tls` feature, and then use `Server::tls`.
212 - Add `warp::cors` filter for CORS support.
213 - Add `warp::addr::remote` to access the remote address of a request.
214 - Add `warp::log::custom` to support customizing of access logging.
215 - Add `warp::test::ws` to improve testing Websocket filters.
217 ### v0.1.9 (October 30, 2018)
220 - Add `warp::ext::get` and `warp::ext::set` to set request extensions.
221 - Add `Filter::untuple_one` to unroll nested tuple layers from extractions.
222 - Add `Ws2::max_send_queue` configuration method.
223 - Add `ws::Message::is_ping` method, and yield pings to user code.
225 - Fix panic in debug mode when receiving a websocket ping.
227 ### v0.1.8 (October 25, 2018)
230 - Improved flexibility of `Rejection` system.
232 The `Rejection` type can now nest and combine arbitrary rejections,
233 so it is no longer bound to a small set of meanings. The ranking of
234 status codes is still used to determine which rejection gets priority.
236 A different priority can be implemented by handling rejections with
237 a `Filter::recover`, and searching for causes in order via
238 `Rejection::find_cause`.
239 - Adds `warp::reject::custom()` to create a `Rejection` with
240 any `Into<Box<std::error::Error>>`. These rejections should be
241 handled with an eventual `Filter::recover`. Any unhandled
242 custom rejections are considered a server error.
243 - Deprecates `Rejection::with`. Use custom rejections instead.
244 - Deprecates `Rejection::into_cause`, as it can no longer work. Always
245 returns `Err(Rejection)`.
246 - Deprecates `Rejection::json`, since the format needed is too generic.
247 The `errors.rs` example shows how to send custom JSON when recovering
249 - Deprecates `warp::reject()`, since it current signals a `400 Bad
250 Request`, but in newer versions, it will signal `404 Not Found`.
251 It's deprecated simply to warn that the semantics are changing,
252 but the function won't actually go away.
253 - Deprecates `reject::bad_request()`, `reject::forbidden()`, and
254 `reject::server_error()`. Uses custom rejections instead.
255 - Renamed `warp::path::index` to `warp::path::end`.
258 ### v0.1.7 (October 15, 2018)
261 - Export the types returned from the `warp::body::stream()` filter, `BodyStream` and `StreamBuf`.
262 - Deprecated `Rejection::into_cause`, since an upcoming Rejection refactor will make it impossible to support.
265 - Fix websocket filters to do a case-insensitive match of the `Connection` header.
267 ### v0.1.6 (October 5, 2018)
270 - Add Conditional and Range request support for `warp::fs` filters.
271 - Relaxed bounds on `Rejection::with` to no longer need to be `Sized`.
272 - Add `warp::path::peek()` which gets the unmatched tail without adjusting the currently matched path.
274 ### v0.1.5 (October 3, 2018)
277 - Serve `index.html` automatically with `warp::fs::dir` filter.
278 - Include `last-modified` header with `warp::fs` filters.
279 - Add `warp::redirect` to easily reply with redirections.
280 - Add `warp::reply::{with_status, with_header}` to wrap `impl Reply`s directly with a new status code or header.
281 - Add support for running a warp `Server` with a custom source of incoming connections.
282 - `Server::run_incoming` to have the runtime started automatically.
283 - `Server::serve_incoming` to get a future to run on existing runtime.
284 - These can be used to support Unix Domain Sockets, TLS, and other transports.
285 - Add `Rejection::into_cause()` to retrieve the original error of a rejection back.
286 - Add `Rejection::json()` to convert a rejection into a JSON response.
289 - Internal errors in warp that result in rendering a `500 Internal Server Error` are now also logged at the `error` level.
292 ### v0.1.4 (September 25, 2018)
295 - Add `warp::reply::with::headers(HeaderMap)` filter wrapper.
296 - Add `warp::cookie::optional()` to get an optional cookie value.
297 - Add `warp::path::full()` to be able to extract the full request path without affecting route matching.
298 - Add graceful shutdown support to the `Server`.
299 - Allow empty query strings to be treated as for `warp::query()`.
301 ### v0.1.3 (August 28, 2018)
304 - Add `warp::reject::forbidden()` to represent `403 Forbidden` responses.
305 - Add `Rejection::with(cause)` to customize rejection messages.
307 - Fix `warp::body::form` to allow charsets in the `content-type` header.
309 ### v0.1.2 (August 14, 2018)
312 - Implemented `Reply` for `Response<impl Into<hyper::Body>`, allowing streaming response bodies.
313 - Add `warp::body::stream()` filter to access the request body as an `impl Stream`.
314 - Add `warp::ws2()` as a more flexible websocket filter.
315 - This allows passing other extracted values to the upgrade callback, such as a value from a header or path.
316 - Deprecates `warp::ws()`, and `ws2()` will become `ws()` in 0.2.
317 - Add `warp::get2()`, `warp::post2()`, `warp::put2()`, and `warp::delete2()` as more standard method filters that are used via chaining instead of nesting.
318 - `get()`, `post()`, `put()`, and `delete()` are deprecated, and the new versions will become them in 0.2.
319 - Add `Filter::unify()` for when a filter returns `Either<T, T>`, converting the `Either` into the inner `T`, regardless of which variant it was.
320 - This requires that both sides of the `Either` be the same type.
321 - This can be useful when extracting a value that might be present in different places of the request.
324 // Allow `MyId` to be a path parameter or a header...
325 let id = warp::path::param::<MyId>()
326 .or(warp::header::<MyId>())
329 // A way of providing default values...
330 let dnt = warp::header::<bool>("dnt")
331 .or(warp::any().map(|| true))
334 - Add `content-type` header automatically to replies from `file` and `dir` filters based on file extension.
335 - Add `warp::head()`, `warp::options()`, and `warp::patch()` as new Method filters.
336 - Try to use OS blocksize in `warp::fs` filters.
338 - Chaining filters that try to consume the request body will log that the body is already consumed, and return a `500 Internal Server Error` rejection.
340 ### v0.1.1 (August 7, 2018)
343 - Add `warp::query::raw()` filter to get query as a `String`.
344 - Add `Filter::recover()` to ease customizing of rejected responses.
345 - Add `warp::header::headers_clone()` filter to get a clone of request's `HeaderMap`.
346 - Add `warp::path::tail()` filter to get remaining "tail" of the request path.
348 - URL decode path segments in `warp::fs` filters.
351 ## v0.1.0 (August 1, 2018)