From ae52b68e369b5995b35ddccc8cebc987d00472d7 Mon Sep 17 00:00:00 2001 From: yjaaidi Date: Mon, 14 Nov 2016 21:23:36 +0100 Subject: [PATCH] BUGFIX: Skipping headers correctly Headers in `IGNORED_HEADERS` were not skipped as the comparison was case sensitive while it should not. --- django_seo_js/backends/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_seo_js/backends/base.py b/django_seo_js/backends/base.py index 186a814..8aa2d5f 100644 --- a/django_seo_js/backends/base.py +++ b/django_seo_js/backends/base.py @@ -63,7 +63,7 @@ def __init__(self, *args, **kwargs): def build_django_response_from_requests_response(self, response): r = HttpResponse(response.content) for k, v in response.headers.items(): - if k not in IGNORED_HEADERS: + if k.lower() not in IGNORED_HEADERS: r[k] = v r['content-length'] = len(response.content) r.status_code = response.status_code