diff --git a/tests/settings_tests/tests.py b/tests/settings_tests/tests.py index 3770d15a3d2..d663f6e819c 100644 --- a/tests/settings_tests/tests.py +++ b/tests/settings_tests/tests.py @@ -361,24 +361,24 @@ class SecureProxySslHeaderTest(SimpleTestCase): req = HttpRequest() self.assertIs(req.is_secure(), False) - @override_settings(SECURE_PROXY_SSL_HEADER=('HTTP_X_FORWARDED_PROTOCOL', 'https')) + @override_settings(SECURE_PROXY_SSL_HEADER=('HTTP_X_FORWARDED_PROTO', 'https')) def test_set_without_xheader(self): req = HttpRequest() self.assertIs(req.is_secure(), False) - @override_settings(SECURE_PROXY_SSL_HEADER=('HTTP_X_FORWARDED_PROTOCOL', 'https')) + @override_settings(SECURE_PROXY_SSL_HEADER=('HTTP_X_FORWARDED_PROTO', 'https')) def test_set_with_xheader_wrong(self): req = HttpRequest() - req.META['HTTP_X_FORWARDED_PROTOCOL'] = 'wrongvalue' + req.META['HTTP_X_FORWARDED_PROTO'] = 'wrongvalue' self.assertIs(req.is_secure(), False) - @override_settings(SECURE_PROXY_SSL_HEADER=('HTTP_X_FORWARDED_PROTOCOL', 'https')) + @override_settings(SECURE_PROXY_SSL_HEADER=('HTTP_X_FORWARDED_PROTO', 'https')) def test_set_with_xheader_right(self): req = HttpRequest() - req.META['HTTP_X_FORWARDED_PROTOCOL'] = 'https' + req.META['HTTP_X_FORWARDED_PROTO'] = 'https' self.assertIs(req.is_secure(), True) - @override_settings(SECURE_PROXY_SSL_HEADER=('HTTP_X_FORWARDED_PROTOCOL', 'https')) + @override_settings(SECURE_PROXY_SSL_HEADER=('HTTP_X_FORWARDED_PROTO', 'https')) def test_xheader_preferred_to_underlying_request(self): class ProxyRequest(HttpRequest): def _get_scheme(self): @@ -387,7 +387,7 @@ class SecureProxySslHeaderTest(SimpleTestCase): # Client connects via HTTP. req = ProxyRequest() - req.META['HTTP_X_FORWARDED_PROTOCOL'] = 'http' + req.META['HTTP_X_FORWARDED_PROTO'] = 'http' self.assertIs(req.is_secure(), False)