feat(server): add service property to server::conn::Parts

This allows getting the original service back.

Closes #1471

Cherry-pick of commit bf7c0bbf4f55fdf465407874b0b2d4bd748e6783 from the
0.11.x branch.
This commit is contained in:
Sean McArthur
2018-03-22 13:37:09 -07:00
committed by Ran Benita
parent f98f168f07
commit 18c5f640e2
3 changed files with 11 additions and 7 deletions

View File

@@ -354,7 +354,7 @@ where
///
/// Only works for HTTP/1 connections. HTTP/2 connections will panic.
pub fn into_parts(self) -> Parts<T> {
let (io, read_buf) = match self.inner {
let (io, read_buf, _) = match self.inner {
Either::A(h1) => h1.into_inner(),
Either::B(_h2) => {
panic!("http2 cannot into_inner");