From 5f9e30e6e0ce19c1192cbcf8682ee0d53b6345d1 Mon Sep 17 00:00:00 2001 From: Nate Berkopec Date: Wed, 11 Mar 2020 12:49:29 -0600 Subject: [PATCH] Remove LOCALHOST_ADDR. Fix #2175 --- lib/puma/client.rb | 2 +- lib/puma/const.rb | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) 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