1 ### v0.3.3 (September 27, 2022)
4 - Fix `fs` filters path sanitization to reject colons on Windows.
6 ### v0.3.2 (November 9, 2021)
9 - Add `Filter::then()`, which is like `Filter::map()` in that it's infallible, but is async like `Filter::and_then()`.
10 - Add `redirect::found()` reply helper that returns `302 Found`.
11 - Add `compression-brotli` and `compression-gzip` cargo features to enable only the compression you need.
12 - Allow `HEAD` requests to be served to `fs::dir()` filters.
13 - Allow `path!()` with no arguments.
15 - Update private dependencies Tungstenite and Multipart.
16 - Replaces uses of `futures` with `futures-util`, which is a smaller dependency.
19 ### v0.3.1 (March 24, 2021)
22 - Add `pong` constructor to websocket messages.
23 - Add `redirect::see_other` and `redirect::permanent` helpers.
25 - Fix `fs` filters sometimes having an off-by-one error with range requests.
26 - Fix CORS to allow spaces when checking `Access-Control-Request-Headers`.
28 ## v0.3.0 (January 19, 2021)
31 - Add TLS client authentication support.
32 - Add TLS OCSP stapling support.
33 - Add `From<Reject>` for `Rejection`.
34 - Add `close_frame` accessor to `ws::Message`.
38 - Update to hyper v0.14.
39 - Rework `sse` filter to be more like `ws`, with a single `Event` type and builder.
40 - Change `cookie` filter to extract a generic `FromStr` value.
43 ### v0.2.5 (August 31, 2020)
46 - Add `wrap_fn`, which can be used to create a `Wrap` from a closure. These in turn are used with `Filter::with()`.
47 - Add `warp::host` filters to deal with `Host`/`:authority` headers.
48 - Relax some lifetime bounds on `Server`.
50 - Fix panic when URI doesn't have a slash (for example, `CONNECT foo.bar`).
52 ### v0.2.4 (July 20, 2020)
55 - Add `tracing` internals in place of `log` (log is still emitted for backwards compatibility).
56 - Add `warp::trace` module set of filters to customize `tracing` dianostics.
57 - Add `path` method to `warp::fs::File` reply.
58 - Add `source` implementation for `BodyDeserializeError`.
59 - Make `warp::ws::MissingConnectionUpgrade` rejection public.
61 ### v0.2.3 (May 19, 2020)
64 - Add `warp::compression` filters, which will compress response bodies.
65 - Add `warp::header::value()` filter to get a request `HeaderValue`.
66 - Add `request_headers` method to `warp::log::Info`.
67 - Add `max_frame_size` to `warp::ws::Ws` builder.
68 - Add `remote_addr` to `warp::test::RequestBuilder`.
69 - Add `try_bind_with_graceful_shutdown` to `warp::Server` builder.
70 - Add `serve_incoming_with_graceful_shutdown` to `warp::Server` builder.
72 - Fix `warp::addr::remote` when used with `Server::tls`.
73 - Fix panic in `warp::path::{peek, tail, full}` filters when the request URI is in authority-form or asterisk-form.
75 ### v0.2.2 (March 3, 2020)
78 - Implement `Reply` for all `Box<T>` where `T: Reply`.
79 - Add `name` methods to `MissingHeader`, `InvalidHeader`, and `MissingCookie` rejections.
80 - Add `warp::ext::optional()` filter that optionally retrieves an extension from the request.
82 - Fix the sending of pings when a user sends a `ws::Message::ping()`.
84 ### v0.2.1 (January 23, 2020)
87 - Add `close` and `close_with` constructors to `warp::ws::Message`.
89 - Fix `warp::fs` filters using a very small read buffer.
91 ## v0.2.0 (January 16, 2020)
94 - Update to `std::future`, adding `async`/`await` support!
95 - Add `warp::service()` to convert a `Filter` into a `tower::Service`.
96 - Implement `Reply` for `Box<dyn Reply>`.
98 - Refactored Rejection system (#311).
99 - Change `path!` macro to assume a `path::end()` by default, with explicit `/ ..` to allow building a prefix (#359).
100 - Change `warp::path(str)` to accept any `AsRef<str>` argument.
101 - Rename "2"-suffixed filters and types (`get2` to `get`, `ws2` to `ws`, etc).
102 - `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())`).
103 - Change several `warp::body` filters (#345).
104 - Change `warp::cors()` to return a `warp::cors::Builder` which still implements `Wrap`, but can also `build` a cheaper-to-clone wrapper.
105 - Change `warp::multipart` stream API to allow for errors when streaming.
106 - Change `warp::sse` to no longer return a `Filter`, adds `warp::sse::reply` to do what `Sse::reply` did.
107 - Change `Server::tls()` to return a TLS server builder (#340).
108 - Change internal `warp::never::Never` usage with `std::convert::Infallible`.
109 - Remove `warp::ext::set()` function (#222).
110 - Remove deprecated `warp::cookie::optional_value()`.
113 ### v0.1.20 (September 17, 2019)
116 - Implement `Clone` for the `warp::cors` filter.
117 - Add `into_bytes` method for `warp::ws::Message`.
119 ### v0.1.19 (August 16, 2019)
122 - Make `warp::multipart` and `wrap::ws` support optional, though enabled by default.
124 - Fix `warp::fs::dir` filter to reject paths containing backslashes.
126 ### v0.1.18 (July 25, 2019)
129 - Add `warp::multipart` support.
131 ### v0.1.17 (July 8, 2019)
134 - Export all built-in Rejection causes in the `warp::reject` module.
135 - Add `Server::try_bind` as fallible bind methods.
137 ### v0.1.16 (June 11, 2019)
140 - Unseal the `Reply` trait: custom types can now implement `Reply`.
141 - Add `warp::sse::keep_alive()` replacement for `warp::sse::keep()` which allows customizing keep-alive behavior.
142 - Add `warp::log::Info::host()` accessor.
144 - Fix `warp::fs` filters from sending some headers for `304` responses.
146 ### v0.1.15 (April 2, 2019)
149 - Add more accessors to `warp::log::Info` type for building custom log formats.
150 - Implement `Reply` for `Cow<'static, str>`.
152 ### v0.1.14 (March 19, 2019)
155 - Add `warp::header::optional` filter.
157 ### v0.1.13 (February 13, 2019)
160 - Implement `Reply` for `Vec<u8>` and `&'static [u8]`.
161 - Set `content-type` header automatically for string and bytes replies.
162 - Add `expose_headers` to `warp::cors` filter.
164 ### v0.1.12 (January 29, 2019)
167 - Implement `PartialEq`, `Eq`, and `Clone` for `warp::ws::Message`.
169 - Fix panic when incoming request URI may not have a path (such as `CONNECT` requests).
171 ### v0.1.11 (January 14, 2019)
174 - Add `warp::sse` filters for handling Server-Sent-Events.
175 - Add `allow_headers` to `warp::cors` filter.
177 - Fix TLS handshake to close the connection if handshake fails.
179 ### v0.1.10 (December 17, 2018)
182 - Add optional TLS support. Enable the `tls` feature, and then use `Server::tls`.
183 - Add `warp::cors` filter for CORS support.
184 - Add `warp::addr::remote` to access the remote address of a request.
185 - Add `warp::log::custom` to support customizing of access logging.
186 - Add `warp::test::ws` to improve testing Websocket filters.
188 ### v0.1.9 (October 30, 2018)
191 - Add `warp::ext::get` and `warp::ext::set` to set request extensions.
192 - Add `Filter::untuple_one` to unroll nested tuple layers from extractions.
193 - Add `Ws2::max_send_queue` configuration method.
194 - Add `ws::Message::is_ping` method, and yield pings to user code.
196 - Fix panic in debug mode when receiving a websocket ping.
198 ### v0.1.8 (October 25, 2018)
201 - Improved flexibility of `Rejection` system.
203 The `Rejection` type can now nest and combine arbitrary rejections,
204 so it is no longer bound to a small set of meanings. The ranking of
205 status codes is still used to determine which rejection gets priority.
207 A different priority can be implemented by handling rejections with
208 a `Filter::recover`, and searching for causes in order via
209 `Rejection::find_cause`.
210 - Adds `warp::reject::custom()` to create a `Rejection` with
211 any `Into<Box<std::error::Error>>`. These rejections should be
212 handled with an eventual `Filter::recover`. Any unhandled
213 custom rejections are considered a server error.
214 - Deprecates `Rejection::with`. Use custom rejections instead.
215 - Deprecates `Rejection::into_cause`, as it can no longer work. Always
216 returns `Err(Rejection)`.
217 - Deprecates `Rejection::json`, since the format needed is too generic.
218 The `errors.rs` example shows how to send custom JSON when recovering
220 - Deprecates `warp::reject()`, since it current signals a `400 Bad
221 Request`, but in newer versions, it will signal `404 Not Found`.
222 It's deprecated simply to warn that the semantics are changing,
223 but the function won't actually go away.
224 - Deprecates `reject::bad_request()`, `reject::forbidden()`, and
225 `reject::server_error()`. Uses custom rejections instead.
226 - Renamed `warp::path::index` to `warp::path::end`.
229 ### v0.1.7 (October 15, 2018)
232 - Export the types returned from the `warp::body::stream()` filter, `BodyStream` and `StreamBuf`.
233 - Deprecated `Rejection::into_cause`, since an upcoming Rejection refactor will make it impossible to support.
236 - Fix websocket filters to do a case-insensitive match of the `Connection` header.
238 ### v0.1.6 (October 5, 2018)
241 - Add Conditional and Range request support for `warp::fs` filters.
242 - Relaxed bounds on `Rejection::with` to no longer need to be `Sized`.
243 - Add `warp::path::peek()` which gets the unmatched tail without adjusting the currently matched path.
245 ### v0.1.5 (October 3, 2018)
248 - Serve `index.html` automatically with `warp::fs::dir` filter.
249 - Include `last-modified` header with `warp::fs` filters.
250 - Add `warp::redirect` to easily reply with redirections.
251 - Add `warp::reply::{with_status, with_header}` to wrap `impl Reply`s directly with a new status code or header.
252 - Add support for running a warp `Server` with a custom source of incoming connections.
253 - `Server::run_incoming` to have the runtime started automatically.
254 - `Server::serve_incoming` to get a future to run on existing runtime.
255 - These can be used to support Unix Domain Sockets, TLS, and other transports.
256 - Add `Rejection::into_cause()` to retrieve the original error of a rejection back.
257 - Add `Rejection::json()` to convert a rejection into a JSON response.
260 - Internal errors in warp that result in rendering a `500 Internal Server Error` are now also logged at the `error` level.
263 ### v0.1.4 (September 25, 2018)
266 - Add `warp::reply::with::headers(HeaderMap)` filter wrapper.
267 - Add `warp::cookie::optional()` to get an optional cookie value.
268 - Add `warp::path::full()` to be able to extract the full request path without affecting route matching.
269 - Add graceful shutdown support to the `Server`.
270 - Allow empty query strings to be treated as for `warp::query()`.
272 ### v0.1.3 (August 28, 2018)
275 - Add `warp::reject::forbidden()` to represent `403 Forbidden` responses.
276 - Add `Rejection::with(cause)` to customize rejection messages.
278 - Fix `warp::body::form` to allow charsets in the `content-type` header.
280 ### v0.1.2 (August 14, 2018)
283 - Implemented `Reply` for `Response<impl Into<hyper::Body>`, allowing streaming response bodies.
284 - Add `warp::body::stream()` filter to access the request body as an `impl Stream`.
285 - Add `warp::ws2()` as a more flexible websocket filter.
286 - This allows passing other extracted values to the upgrade callback, such as a value from a header or path.
287 - Deprecates `warp::ws()`, and `ws2()` will become `ws()` in 0.2.
288 - Add `warp::get2()`, `warp::post2()`, `warp::put2()`, and `warp::delete2()` as more standard method filters that are used via chaining instead of nesting.
289 - `get()`, `post()`, `put()`, and `delete()` are deprecated, and the new versions will become them in 0.2.
290 - Add `Filter::unify()` for when a filter returns `Either<T, T>`, converting the `Either` into the inner `T`, regardless of which variant it was.
291 - This requires that both sides of the `Either` be the same type.
292 - This can be useful when extracting a value that might be present in different places of the request.
295 // Allow `MyId` to be a path parameter or a header...
296 let id = warp::path::param::<MyId>()
297 .or(warp::header::<MyId>())
300 // A way of providing default values...
301 let dnt = warp::header::<bool>("dnt")
302 .or(warp::any().map(|| true))
305 - Add `content-type` header automatically to replies from `file` and `dir` filters based on file extension.
306 - Add `warp::head()`, `warp::options()`, and `warp::patch()` as new Method filters.
307 - Try to use OS blocksize in `warp::fs` filters.
309 - 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.
311 ### v0.1.1 (August 7, 2018)
314 - Add `warp::query::raw()` filter to get query as a `String`.
315 - Add `Filter::recover()` to ease customizing of rejected responses.
316 - Add `warp::header::headers_clone()` filter to get a clone of request's `HeaderMap`.
317 - Add `warp::path::tail()` filter to get remaining "tail" of the request path.
319 - URL decode path segments in `warp::fs` filters.
322 ## v0.1.0 (August 1, 2018)