aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/utils.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-10-27 14:00:50 +1300
committerAldo Cortesi <aldo@nullcube.com>2012-10-27 14:00:50 +1300
commit06864e5a1b61eaa6684dc8b1a6bdc11ae7987720 (patch)
tree447dcccdec071030ba43153a2b7c85e18647b433 /libpathod/utils.py
parent6174e46023e798517ac206b7681dd9c7d36b1283 (diff)
downloadmitmproxy-06864e5a1b61eaa6684dc8b1a6bdc11ae7987720.tar.gz
mitmproxy-06864e5a1b61eaa6684dc8b1a6bdc11ae7987720.tar.bz2
mitmproxy-06864e5a1b61eaa6684dc8b1a6bdc11ae7987720.zip
Major refactoring towars separate representation of expressions and request/response service.
Diffstat (limited to 'libpathod/utils.py')
-rw-r--r--libpathod/utils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/libpathod/utils.py b/libpathod/utils.py
index ac0c0e4c..70a97cff 100644
--- a/libpathod/utils.py
+++ b/libpathod/utils.py
@@ -26,9 +26,10 @@ def get_header(val, headers):
"""
Header keys may be Values, so we have to "generate" them as we try the match.
"""
- for k, v in headers:
+ for h in headers:
+ k = h.key.get_generator({})
if len(k) == len(val) and k[:].lower() == val.lower():
- return v
+ return h
return None