fix(client): error on unsupport 101 responses, ignore other 1xx codes

This commit is contained in:
Sean McArthur
2018-01-23 11:33:24 -08:00
parent d8b1aa848c
commit 227742221f
5 changed files with 224 additions and 99 deletions

View File

@@ -147,7 +147,7 @@ pub trait Http1Transaction {
type Incoming;
type Outgoing: Default;
fn parse(bytes: &mut BytesMut) -> ParseResult<Self::Incoming>;
fn decoder(head: &MessageHead<Self::Incoming>, method: &mut Option<::Method>) -> ::Result<h1::Decoder>;
fn decoder(head: &MessageHead<Self::Incoming>, method: &mut Option<::Method>) -> ::Result<Option<h1::Decoder>>;
fn encode(head: MessageHead<Self::Outgoing>, has_body: bool, method: &mut Option<Method>, dst: &mut Vec<u8>) -> h1::Encoder;
fn should_error_on_parse_eof() -> bool;