From 2e32780dc7d13a00b8243c65059b12afd99502a5 Mon Sep 17 00:00:00 2001 From: Graham Seaman Date: Wed, 1 Feb 2017 16:28:07 +0000 Subject: [PATCH] Force header names to lower to allow for CaseInsensitvieDict variability --- linkcheck/plugins/httpheaderinfo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linkcheck/plugins/httpheaderinfo.py b/linkcheck/plugins/httpheaderinfo.py index ddfe14fb..0955d2d1 100644 --- a/linkcheck/plugins/httpheaderinfo.py +++ b/linkcheck/plugins/httpheaderinfo.py @@ -36,8 +36,8 @@ class HttpHeaderInfo(_ConnectionPlugin): """Check content for invalid anchors.""" headers = [] for name, value in url_data.headers.items(): - if name.startswith(self.prefixes): - headers.append(name) + if name.lower().startswith(self.prefixes): + headers.append(name.lower()) if headers: items = [u"%s=%s" % (name.capitalize(), url_data.headers[name]) for name in headers] info = u"HTTP headers %s" % u", ".join(items)