Fix a bug in the header generation
authorDavid Kerkeslager <kerkeslager@gmail.com>
Sat, 14 Dec 2019 00:01:44 +0000 (19:01 -0500)
committerDavid Kerkeslager <kerkeslager@gmail.com>
Sat, 14 Dec 2019 00:01:44 +0000 (19:01 -0500)
src/fwx/__init__.py
src/test_fwx.py

index d26083b..6ee7541 100644 (file)
@@ -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:
index f437964..97a7f74 100644 (file)
@@ -49,6 +49,7 @@ class ResponseTests(unittest.TestCase):
             response.headers,
             (
                 ('Content-Type', 'text/plain'),
+                ('X-Content-Type-Options', 'nosniff'),
             ),
         )