Added support for Accept-Encoding
Signed-off-by: Alexandru Cihodaru <cihodar@amazon.com> Signed-off-by: YUAN LYU <lyuyuan92@gmail.com>
This commit is contained in:
committed by
Adrian Catangiu
parent
8a8d7bb5b1
commit
683b85d07e
@@ -510,5 +510,15 @@ mod tests {
|
||||
assert_eq!(request.headers.expect(), false);
|
||||
assert_eq!(request.headers.content_length(), 0);
|
||||
assert!(request.body.is_none());
|
||||
|
||||
let request = Request::try_from(b"GET http://localhost/ HTTP/1.0\r\n\
|
||||
Accept-Encoding: identity;q=0\r\n\r\n");
|
||||
assert_eq!(
|
||||
request.unwrap_err(),
|
||||
RequestError::HeaderError(HttpHeaderError::InvalidValue(
|
||||
"Accept-Encoding".to_string(),
|
||||
"identity;q=0".to_string()
|
||||
))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user