From 1f5bac15cd8e4393c6da98eb7bb4532133dc6259 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 21 Dec 2010 01:28:23 +0000 Subject: http: hook up "trust_x_forwarded" to configurator More config bloat, sadly this is necessary for Rainbows! :< --- test/unit/test_http_parser_xftrust.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/unit/test_http_parser_xftrust.rb b/test/unit/test_http_parser_xftrust.rb index 8c3db40..c396bc4 100644 --- a/test/unit/test_http_parser_xftrust.rb +++ b/test/unit/test_http_parser_xftrust.rb @@ -5,11 +5,11 @@ include Unicorn class HttpParserXFTrustTest < Test::Unit::TestCase def setup - assert HttpParser.x_forwarded_trust? + assert HttpParser.trust_x_forward? end def test_xf_trust_false_xfp - HttpParser.x_forwarded_trust = false + HttpParser.trust_x_forward = false parser = HttpParser.new parser.buf << "GET / HTTP/1.1\r\nHost: foo:\r\n" \ "X-Forwarded-Proto: https\r\n\r\n" @@ -21,7 +21,7 @@ class HttpParserXFTrustTest < Test::Unit::TestCase end def test_xf_trust_false_xfs - HttpParser.x_forwarded_trust = false + HttpParser.trust_x_forward = false parser = HttpParser.new parser.buf << "GET / HTTP/1.1\r\nHost: foo:\r\n" \ "X-Forwarded-SSL: on\r\n\r\n" @@ -33,6 +33,6 @@ class HttpParserXFTrustTest < Test::Unit::TestCase end def teardown - HttpParser.x_forwarded_trust = true + HttpParser.trust_x_forward = true end end -- cgit v1.2.3-24-ge0c7