Merge branch 'master' into testserver-listen-address

This commit is contained in:
Matt Palmer 2024-06-09 17:32:45 +10:00 committed by GitHub
commit 41618f76dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 9 additions and 4 deletions

View File

@ -2,6 +2,10 @@
## Unreleased
### Added
- Add `error::InvalidStatusCode` re-export.
## 3.7.0
### Added

View File

@ -106,7 +106,7 @@ tokio-util = { version = "0.7", features = ["io", "codec"] }
tracing = { version = "0.1.30", default-features = false, features = ["log"] }
# http2
h2 = { version = "0.3.24", optional = true }
h2 = { version = "0.3.26", optional = true }
# websockets
local-channel = { version = "0.1", optional = true }

View File

@ -3,7 +3,7 @@
use std::{error::Error as StdError, fmt, io, str::Utf8Error, string::FromUtf8Error};
use derive_more::{Display, Error, From};
pub use http::Error as HttpError;
pub use http::{status::InvalidStatusCode, Error as HttpError};
use http::{uri::InvalidUri, StatusCode};
use crate::{body::BoxBody, Response};

View File

@ -2,6 +2,7 @@
## Unreleased
- Take the encoded buffer when yielding bytes in the response stream rather than splitting the buffer, reducing memory use
- Minimum supported Rust version (MSRV) is now 1.72.
## 4.3.0

View File

@ -710,7 +710,7 @@ where
}
if !this.buf.is_empty() {
Poll::Ready(Some(Ok(this.buf.split().freeze())))
Poll::Ready(Some(Ok(std::mem::take(&mut this.buf).freeze())))
} else if this.fut.alive() && !this.closed {
Poll::Pending
} else {

View File

@ -92,7 +92,7 @@ cfg-if = "1"
derive_more = "0.99.5"
futures-core = { version = "0.3.17", default-features = false, features = ["alloc"] }
futures-util = { version = "0.3.17", default-features = false, features = ["alloc", "sink"] }
h2 = "0.3.24"
h2 = "0.3.26"
http = "0.2.7"
itoa = "1"
log =" 0.4"