File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1025,14 +1025,20 @@ impl<'a> Parser<'a> {
1025
1025
& mut self ,
1026
1026
input : Input < ' i > ,
1027
1027
) -> ParseResult < ( bool , HostInternal , Input < ' i > ) > {
1028
- let ( has_host, host_str, remaining) = Parser :: file_host ( input) ?;
1028
+ let has_host;
1029
+ let ( _, host_str, remaining) = Parser :: file_host ( input) ?;
1029
1030
let host = if host_str. is_empty ( ) {
1031
+ has_host = false ;
1030
1032
HostInternal :: None
1031
1033
} else {
1032
1034
match Host :: parse ( & host_str) ? {
1033
- Host :: Domain ( ref d) if d == "localhost" => HostInternal :: None ,
1035
+ Host :: Domain ( ref d) if d == "localhost" => {
1036
+ has_host = false ;
1037
+ HostInternal :: None
1038
+ }
1034
1039
host => {
1035
1040
write ! ( & mut self . serialization, "{}" , host) . unwrap ( ) ;
1041
+ has_host = true ;
1036
1042
host. into ( )
1037
1043
}
1038
1044
}
You can’t perform that action at this time.
0 commit comments