aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_http_req.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-01-05 00:19:41 +0100
committerLoïc Hoguin <[email protected]>2012-01-05 00:19:41 +0100
commit8ab05058e68ca7ac348416c5b7f6e4b075f65c74 (patch)
tree5816c690fb3940b14d4c118e02c2b51573a4cd86 /src/cowboy_http_req.erl
parent5c101560dfffe56c3d27b430761145faefb73405 (diff)
parentade1fb93cae093c5bb58e9ad6fdd50b1450cce21 (diff)
downloadcowboy-8ab05058e68ca7ac348416c5b7f6e4b075f65c74.tar.gz
cowboy-8ab05058e68ca7ac348416c5b7f6e4b075f65c74.tar.bz2
cowboy-8ab05058e68ca7ac348416c5b7f6e4b075f65c74.zip
Merge branch 'inet_parse_address_fix' of https://github.com/spawngrid/cowboy
Diffstat (limited to 'src/cowboy_http_req.erl')
-rw-r--r--src/cowboy_http_req.erl4
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}.