Validate & convert messages before buffering
Malformed requests and responses should immediately result in a RST_STREAM. To support this, received header frames are validated and converted to Request / Response values immediately on receipt and before buffering.
This commit is contained in:
		| @@ -73,16 +73,6 @@ pub enum Frame<T = Bytes> { | ||||
| } | ||||
|  | ||||
| impl<T> Frame<T> { | ||||
|     /// Returns true if the frame is a DATA frame. | ||||
|     pub fn is_data(&self) -> bool { | ||||
|         use self::Frame::*; | ||||
|  | ||||
|         match *self { | ||||
|             Data(..) => true, | ||||
|             _ => false, | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     pub fn map<F, U>(self, f: F) -> Frame<U> | ||||
|         where F: FnOnce(T) -> U | ||||
|     { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user