1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-27 10:39:03 +02:00

fix test order dep

This commit is contained in:
Nikolay Kim
2019-11-06 11:20:47 -08:00
parent 885ff7396e
commit f7f410d033
2 changed files with 25 additions and 22 deletions

View File

@ -276,7 +276,8 @@ pub fn Host<H: AsRef<str>>(host: H) -> HostGuard {
fn get_host_uri(req: &RequestHead) -> Option<Uri> {
use core::str::FromStr;
req.headers.get(header::HOST)
req.headers
.get(header::HOST)
.and_then(|host_value| host_value.to_str().ok())
.or_else(|| req.uri.host())
.map(|host: &str| Uri::from_str(host).ok())