diff options
author | Michael S. Klishin <michael@novemberain.com> | 2008-07-01 11:52:20 +0300 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-08-27 23:03:11 -0700 |
commit | e42a235dd18a39ccc83382365088de96f24fa236 (patch) | |
tree | b3b2ecd628fa70ab6fbc8ec0649d6b044b2f285d /actionpack/test | |
parent | c2068d14d29ec767c681798b3814f0a8e22fb0ff (diff) | |
download | rails-e42a235dd18a39ccc83382365088de96f24fa236.tar.gz rails-e42a235dd18a39ccc83382365088de96f24fa236.tar.bz2 rails-e42a235dd18a39ccc83382365088de96f24fa236.zip |
Request#remote_ip handles the uncommon case that REMOTE_ADDR is a comma-separated list.
[#523 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/request_test.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/actionpack/test/controller/request_test.rb b/actionpack/test/controller/request_test.rb index 045dab4141..e79a0ea76b 100644 --- a/actionpack/test/controller/request_test.rb +++ b/actionpack/test/controller/request_test.rb @@ -17,6 +17,9 @@ class RequestTest < Test::Unit::TestCase @request.remote_addr = '1.2.3.4' assert_equal '1.2.3.4', @request.remote_ip(true) + @request.remote_addr = '1.2.3.4,3.4.5.6' + assert_equal '1.2.3.4', @request.remote_ip(true) + @request.env['HTTP_CLIENT_IP'] = '2.3.4.5' assert_equal '1.2.3.4', @request.remote_ip(true) |