fix ipv4 parsing in Forwarded

This commit is contained in:
Edward Shen 2021-10-03 19:17:54 -07:00
parent e8d964c392
commit 9a10399d75
Signed by: edward
GPG key ID: 19182661E818369F

View file

@ -37,7 +37,7 @@ async fn root(header: HeaderMap, ConnectInfo(socket_info): ConnectInfo<SocketAdd
return res; return res;
} }
} else { } else {
let res: String = chars.take_while(|c| *c != 'c').collect(); let res: String = chars.take_while(|c| *c != ',').collect();
if res.parse::<Ipv4Addr>().is_ok() { if res.parse::<Ipv4Addr>().is_ok() {
return res; return res;
} }