diff --git a/lib/puma/client.rb b/lib/puma/client.rb index 7b013732..fc88cc03 100644 --- a/lib/puma/client.rb +++ b/lib/puma/client.rb @@ -265,7 +265,7 @@ module Puma return @peerip if @peerip if @remote_addr_header - hdr = (@env[@remote_addr_header] || LOCALHOST_ADDR).split(/[\s,]/).first + hdr = (@env[@remote_addr_header] || LOCALHOST_IP).split(/[\s,]/).first @peerip = hdr return hdr end diff --git a/lib/puma/const.rb b/lib/puma/const.rb index e4be1c07..c000d326 100644 --- a/lib/puma/const.rb +++ b/lib/puma/const.rb @@ -175,7 +175,6 @@ module Puma PORT_443 = "443".freeze LOCALHOST = "localhost".freeze LOCALHOST_IP = "127.0.0.1".freeze - LOCALHOST_ADDR = "127.0.0.1:0".freeze SERVER_PROTOCOL = "SERVER_PROTOCOL".freeze HTTP_11 = "HTTP/1.1".freeze