refactor(http1): move upgrade state from body to head (#2353)

Move state required for protocol upgrades to head
representations, instead of associating it with the body.

Closes #2340.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Arve Knudsen
2020-12-15 16:31:48 +01:00
committed by GitHub
parent 7d9a5806e1
commit ede3a6bd9d
5 changed files with 33 additions and 37 deletions

View File

@@ -16,7 +16,7 @@ cfg_http2! {
}
/// An Incoming Message head. Includes request/status line, and headers.
#[derive(Clone, Debug, Default, PartialEq)]
#[derive(Debug, Default)]
pub struct MessageHead<S> {
/// HTTP version of the message.
pub version: http::Version,
@@ -24,6 +24,9 @@ pub struct MessageHead<S> {
pub subject: S,
/// Headers of the Incoming message.
pub headers: http::HeaderMap,
/// Extensions.
extensions: http::Extensions,
}
/// An incoming request message.