From e10e520d47fa96cf549c7d544d6575baa8ed748a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 16 Feb 2011 01:31:41 +0000 Subject: middleware: add ipv6 address detection for Unicorn Since Unicorn and Rainbows! support IPv6 now, it makes sense to support the rfc2732-style addresses it returns. --- lib/raindrops/middleware.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/raindrops/middleware.rb') diff --git a/lib/raindrops/middleware.rb b/lib/raindrops/middleware.rb index 3507928..79496fc 100644 --- a/lib/raindrops/middleware.rb +++ b/lib/raindrops/middleware.rb @@ -22,7 +22,7 @@ class Raindrops::Middleware @tcp = @unix = nil if tmp - @tcp = tmp.grep(/\A[^:]+:\d+\z/) + @tcp = tmp.grep(/\A.+:\d+\z/) @unix = tmp.grep(%r{\A/}) @tcp = nil if @tcp.empty? @unix = nil if @unix.empty? -- cgit v1.2.3-24-ge0c7