Minor refactoring

This commit is contained in:
Miroslav Stampar 2013-03-11 13:31:50 +01:00
parent 84a5bdb9cf
commit d6fc10092f

View File

@ -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):