diff options
Diffstat (limited to 'libpathod/utils.py')
-rw-r--r-- | libpathod/utils.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libpathod/utils.py b/libpathod/utils.py index 39732849..c656a0d0 100644 --- a/libpathod/utils.py +++ b/libpathod/utils.py @@ -1,6 +1,15 @@ import os, re import rparse +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: + if len(k) == len(val) and k[:].lower() == val: + return v + return None + def parse_anchor_spec(s): """ |