| 1 |
### v0.3.7 (April 5, 2024) |
| 2 |
|
| 3 |
- **Features**: |
| 4 |
- Add ecc private key support to `tls()` config. |
| 5 |
- **Fixes**: |
| 6 |
- Several dependency upgrades. |
| 7 |
|
| 8 |
### v0.3.6 (September 27, 2023) |
| 9 |
|
| 10 |
- **Features**: |
| 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()`. |
| 15 |
- **Fixes**: |
| 16 |
- Updated tungstenite and rustls dependencies for security fixes. |
| 17 |
|
| 18 |
### v0.3.5 (April 28, 2023) |
| 19 |
|
| 20 |
- **Fixes**: |
| 21 |
- `multipart` filters now use `multer` dependency, fixing some streaming bugs. |
| 22 |
- `Rejection::into_response()` is significantly faster. |
| 23 |
|
| 24 |
### v0.3.4 (March 31, 2023) |
| 25 |
|
| 26 |
- **Fixes**: |
| 27 |
- `multipart::Part` data is now streamed instead of buffered. |
| 28 |
- Update dependency used for `multipart` filters. |
| 29 |
|
| 30 |
### v0.3.3 (September 27, 2022) |
| 31 |
|
| 32 |
- **Fixes**: |
| 33 |
- Fix `fs` filters path sanitization to reject colons on Windows. |
| 34 |
|
| 35 |
### v0.3.2 (November 9, 2021) |
| 36 |
|
| 37 |
- **Features**: |
| 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. |
| 43 |
- **Fixes**: |
| 44 |
- Update private dependencies Tungstenite and Multipart. |
| 45 |
- Replaces uses of `futures` with `futures-util`, which is a smaller dependency. |
| 46 |
|
| 47 |
|
| 48 |
### v0.3.1 (March 24, 2021) |
| 49 |
|
| 50 |
- **Features**: |
| 51 |
- Add `pong` constructor to websocket messages. |
| 52 |
- Add `redirect::see_other` and `redirect::permanent` helpers. |
| 53 |
- **Fixes**: |
| 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`. |
| 56 |
|
| 57 |
## v0.3.0 (January 19, 2021) |
| 58 |
|
| 59 |
- **Features**: |
| 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`. |
| 64 |
- **Changes**: |
| 65 |
- Update to Tokio v1. |
| 66 |
- Update to Bytes v1. |
| 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. |
| 70 |
|
| 71 |
|
| 72 |
### v0.2.5 (August 31, 2020) |
| 73 |
|
| 74 |
- **Features**: |
| 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`. |
| 78 |
- **Fixes**: |
| 79 |
- Fix panic when URI doesn't have a slash (for example, `CONNECT foo.bar`). |
| 80 |
|
| 81 |
### v0.2.4 (July 20, 2020) |
| 82 |
|
| 83 |
- **Features**: |
| 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. |
| 89 |
|
| 90 |
### v0.2.3 (May 19, 2020) |
| 91 |
|
| 92 |
- **Features**: |
| 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. |
| 100 |
- **Fixes**: |
| 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. |
| 103 |
|
| 104 |
### v0.2.2 (March 3, 2020) |
| 105 |
|
| 106 |
- **Features**: |
| 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. |
| 110 |
- **Fixes**: |
| 111 |
- Fix the sending of pings when a user sends a `ws::Message::ping()`. |
| 112 |
|
| 113 |
### v0.2.1 (January 23, 2020) |
| 114 |
|
| 115 |
- **Features**: |
| 116 |
- Add `close` and `close_with` constructors to `warp::ws::Message`. |
| 117 |
- **Fixes**: |
| 118 |
- Fix `warp::fs` filters using a very small read buffer. |
| 119 |
|
| 120 |
## v0.2.0 (January 16, 2020) |
| 121 |
|
| 122 |
- **Features**: |
| 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>`. |
| 126 |
- **Changes**: |
| 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()`. |
| 140 |
|
| 141 |
|
| 142 |
### v0.1.20 (September 17, 2019) |
| 143 |
|
| 144 |
- **Features**: |
| 145 |
- Implement `Clone` for the `warp::cors` filter. |
| 146 |
- Add `into_bytes` method for `warp::ws::Message`. |
| 147 |
|
| 148 |
### v0.1.19 (August 16, 2019) |
| 149 |
|
| 150 |
- **Features**: |
| 151 |
- Make `warp::multipart` and `wrap::ws` support optional, though enabled by default. |
| 152 |
- **Fixes**: |
| 153 |
- Fix `warp::fs::dir` filter to reject paths containing backslashes. |
| 154 |
|
| 155 |
### v0.1.18 (July 25, 2019) |
| 156 |
|
| 157 |
- **Features**: |
| 158 |
- Add `warp::multipart` support. |
| 159 |
|
| 160 |
### v0.1.17 (July 8, 2019) |
| 161 |
|
| 162 |
- **Features**: |
| 163 |
- Export all built-in Rejection causes in the `warp::reject` module. |
| 164 |
- Add `Server::try_bind` as fallible bind methods. |
| 165 |
|
| 166 |
### v0.1.16 (June 11, 2019) |
| 167 |
|
| 168 |
- **Features**: |
| 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. |
| 172 |
- **Fixes**: |
| 173 |
- Fix `warp::fs` filters from sending some headers for `304` responses. |
| 174 |
|
| 175 |
### v0.1.15 (April 2, 2019) |
| 176 |
|
| 177 |
- **Features**: |
| 178 |
- Add more accessors to `warp::log::Info` type for building custom log formats. |
| 179 |
- Implement `Reply` for `Cow<'static, str>`. |
| 180 |
|
| 181 |
### v0.1.14 (March 19, 2019) |
| 182 |
|
| 183 |
- **Features**: |
| 184 |
- Add `warp::header::optional` filter. |
| 185 |
|
| 186 |
### v0.1.13 (February 13, 2019) |
| 187 |
|
| 188 |
- **Features**: |
| 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. |
| 192 |
|
| 193 |
### v0.1.12 (January 29, 2019) |
| 194 |
|
| 195 |
- **Features**: |
| 196 |
- Implement `PartialEq`, `Eq`, and `Clone` for `warp::ws::Message`. |
| 197 |
- **Fixes**: |
| 198 |
- Fix panic when incoming request URI may not have a path (such as `CONNECT` requests). |
| 199 |
|
| 200 |
### v0.1.11 (January 14, 2019) |
| 201 |
|
| 202 |
- **Features**: |
| 203 |
- Add `warp::sse` filters for handling Server-Sent-Events. |
| 204 |
- Add `allow_headers` to `warp::cors` filter. |
| 205 |
- **Fixes**: |
| 206 |
- Fix TLS handshake to close the connection if handshake fails. |
| 207 |
|
| 208 |
### v0.1.10 (December 17, 2018) |
| 209 |
|
| 210 |
- **Features**: |
| 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. |
| 216 |
|
| 217 |
### v0.1.9 (October 30, 2018) |
| 218 |
|
| 219 |
- **Features**: |
| 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. |
| 224 |
- **Fixes**: |
| 225 |
- Fix panic in debug mode when receiving a websocket ping. |
| 226 |
|
| 227 |
### v0.1.8 (October 25, 2018) |
| 228 |
|
| 229 |
- **Features**: |
| 230 |
- Improved flexibility of `Rejection` system. |
| 231 |
|
| 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. |
| 235 |
|
| 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 |
| 248 |
from rejections. |
| 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`. |
| 256 |
|
| 257 |
|
| 258 |
### v0.1.7 (October 15, 2018) |
| 259 |
|
| 260 |
- **Features**: |
| 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. |
| 263 |
|
| 264 |
- **Fixes**: |
| 265 |
- Fix websocket filters to do a case-insensitive match of the `Connection` header. |
| 266 |
|
| 267 |
### v0.1.6 (October 5, 2018) |
| 268 |
|
| 269 |
- **Features**: |
| 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. |
| 273 |
|
| 274 |
### v0.1.5 (October 3, 2018) |
| 275 |
|
| 276 |
- **Features**: |
| 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. |
| 287 |
|
| 288 |
- **Fixes** |
| 289 |
- Internal errors in warp that result in rendering a `500 Internal Server Error` are now also logged at the `error` level. |
| 290 |
|
| 291 |
|
| 292 |
### v0.1.4 (September 25, 2018) |
| 293 |
|
| 294 |
- **Features**: |
| 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()`. |
| 300 |
|
| 301 |
### v0.1.3 (August 28, 2018) |
| 302 |
|
| 303 |
- **Features**: |
| 304 |
- Add `warp::reject::forbidden()` to represent `403 Forbidden` responses. |
| 305 |
- Add `Rejection::with(cause)` to customize rejection messages. |
| 306 |
- **Fixes**: |
| 307 |
- Fix `warp::body::form` to allow charsets in the `content-type` header. |
| 308 |
|
| 309 |
### v0.1.2 (August 14, 2018) |
| 310 |
|
| 311 |
- **Features**: |
| 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. |
| 322 |
|
| 323 |
```rust |
| 324 |
// Allow `MyId` to be a path parameter or a header... |
| 325 |
let id = warp::path::param::<MyId>() |
| 326 |
.or(warp::header::<MyId>()) |
| 327 |
.unify(); |
| 328 |
|
| 329 |
// A way of providing default values... |
| 330 |
let dnt = warp::header::<bool>("dnt") |
| 331 |
.or(warp::any().map(|| true)) |
| 332 |
.unify(); |
| 333 |
``` |
| 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. |
| 337 |
- **Fixes**: |
| 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. |
| 339 |
|
| 340 |
### v0.1.1 (August 7, 2018) |
| 341 |
|
| 342 |
- **Features**: |
| 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. |
| 347 |
- **Fixes**: |
| 348 |
- URL decode path segments in `warp::fs` filters. |
| 349 |
|
| 350 |
|
| 351 |
## v0.1.0 (August 1, 2018) |
| 352 |
|
| 353 |
- Initial release. |