From 0c14599efdab4788b446d2526b120c03a2868187 Mon Sep 17 00:00:00 2001 From: Bart ten Brinke Date: Tue, 22 Jan 2013 15:14:42 +0100 Subject: Added spec for new Squid behaviour. Also see http://www.squid-cache.org/Doc/config/forwarded_for/ --- test/spec_request.rb | 5 +++++ 1 file changed, 5 insertions(+) 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 @@ -929,6 +929,11 @@ EOF 'HTTP_X_FORWARDED_FOR' => '3.4.5.6' 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' -- cgit v1.2.1