diff --git a/lib/core/common.py b/lib/core/common.py index ef6d340c7..afcc9a152 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -3457,9 +3457,7 @@ def getRequestHeader(request, name): retVal = None if request and name: - retVal = max(request.get_header(_) if name.upper() == _.upper() else None for _ in request.headers.keys()) - if not retVal and request.unredirected_hdrs: - retVal = max(request.unredirected_hdrs.get(_) if name.upper() == _.upper() else None for _ in request.unredirected_hdrs.keys()) + retVal = max(value if name.upper() == key.upper() else None for key, value in request.header_items()) return retVal def isNumber(value):