From d6fc10092f3bd486694957cca6d319ca9be2f25d Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 11 Mar 2013 13:31:50 +0100 Subject: [PATCH] Minor refactoring --- lib/core/common.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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):