diff options
author | Bart ten Brinke <info@retrosync.com> | 2013-01-22 15:14:42 +0100 |
---|---|---|
committer | Bart ten Brinke <info@retrosync.com> | 2013-01-22 15:14:42 +0100 |
commit | 0c14599efdab4788b446d2526b120c03a2868187 (patch) | |
tree | 1e9946f10b0e452daa7af4cd9a4c1324034c11ec /test/spec_request.rb | |
parent | 8025a4ae9477d1e6231344c2b7d795aa9b3717b6 (diff) | |
download | rack-0c14599efdab4788b446d2526b120c03a2868187.tar.gz |
Added spec for new Squid behaviour.
Also see http://www.squid-cache.org/Doc/config/forwarded_for/
Diffstat (limited to 'test/spec_request.rb')
-rw-r--r-- | test/spec_request.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/spec_request.rb b/test/spec_request.rb index 6de19322..67e8338c 100644 --- a/test/spec_request.rb +++ b/test/spec_request.rb @@ -930,6 +930,11 @@ EOF res.body.should.equal '1.2.3.4' res = mock.get '/', + 'REMOTE_ADDR' => '1.2.3.4', + 'HTTP_X_FORWARDED_FOR' => 'unknown' + res.body.should.equal '1.2.3.4' + + res = mock.get '/', 'REMOTE_ADDR' => '127.0.0.1', 'HTTP_X_FORWARDED_FOR' => '3.4.5.6' res.body.should.equal '3.4.5.6' |