(request, name)
return retVal
Solving an issue with an urllib2 Request header case sensitivity

    Reference: http://bugs.python.org/issue2275
Solving an issue with an urllib2 Request header case sensitivity
Solving an issue with an urllib2 Request header case sensitivity
def getRequestHeader(request, name):
    """
    Solving an issue with an urllib2 Request header case sensitivity

    Reference: http://bugs.python.org/issue2275
    """

    retVal = None
    if request and name:
        retVal = max(value if name.upper() == key.upper() else None for key, value in request.header_items())
    return retVal
def getRequestHeader ( request , name ) : retVal = None if request and name : retVal = max ( value if name . upper ( ) == key . upper ( ) else None for key , value in request . header_items ( ) ) return retVal