diff options
Diffstat (limited to 'src/cowboy_http_req.erl')
-rw-r--r-- | src/cowboy_http_req.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cowboy_http_req.erl b/src/cowboy_http_req.erl index 057ea4d..7a0e3a7 100644 --- a/src/cowboy_http_req.erl +++ b/src/cowboy_http_req.erl @@ -89,8 +89,8 @@ peer_addr(Req = #http_req{}) -> end end, {ok, PeerAddr} = if - is_binary(RealIp) -> inet_parse:address(RealIp); - is_binary(ForwardedFor) -> inet_parse:address(ForwardedFor); + is_binary(RealIp) -> inet_parse:address(binary_to_list(RealIp)); + is_binary(ForwardedFor) -> inet_parse:address(binary_to_list(ForwardedFor)); true -> {ok, PeerIp} end, {PeerAddr, Req3}. |