From 7b02629c8e924154857f35cef1364bef66fe3b75 Mon Sep 17 00:00:00 2001 From: David Kerkeslager Date: Fri, 13 Dec 2019 19:01:44 -0500 Subject: [PATCH] Fix a bug in the header generation --- src/fwx/__init__.py | 2 +- src/test_fwx.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fwx/__init__.py b/src/fwx/__init__.py index d26083b..6ee7541 100644 --- a/src/fwx/__init__.py +++ b/src/fwx/__init__.py @@ -158,7 +158,7 @@ class Response(_Response): 'Content-Type': self.content_type, } - for key, value in builtin_headers: + for key, value in builtin_headers.items(): if key in result: raise Exception('Header "{}" defined twice'.format(key)) else: diff --git a/src/test_fwx.py b/src/test_fwx.py index f437964..97a7f74 100644 --- a/src/test_fwx.py +++ b/src/test_fwx.py @@ -49,6 +49,7 @@ class ResponseTests(unittest.TestCase): response.headers, ( ('Content-Type', 'text/plain'), + ('X-Content-Type-Options', 'nosniff'), ), ) -- 2.20.1