Fix panic on invalid authority

This commit is contained in:
Koga Kazuo
2020-04-12 11:00:07 +09:00
committed by Martin Algesten
parent 661853b95d
commit e5fa36f98e
2 changed files with 10 additions and 1 deletions

View File

@@ -202,4 +202,12 @@ mod tests {
);
assert_eq!("text/html", resp.content_type());
}
#[test]
#[cfg(feature = "tls")]
fn connect_https_invalid_name() {
let resp = get("https://example.com{REQUEST_URI}/").call();
assert_eq!(400, resp.status());
assert!(resp.synthetic());
}
}