'The RFC defines only some cases in which the HTTP response can
return 30x codes, and which codes can be returned.
:return: True if we can redirect'

def redirect_allowed_by_rfc(self, req, code):

    m = req.get_method()
    if (((code in GET_HEAD_CODES) and (m in GET_HEAD)) or ((code in POST_CODES) and (m == POST))):
        return True
    return False
