def _invalid_headers(self, url, headers):
    '\n        Verify whether the provided metadata in the URL is also present in the headers\n        :param url: .../file.txt&content-type=app%2Fjson&Signature=..\n        :param headers: Content-Type=app/json\n        :return: True or False\n        '
    metadata_to_check = {'content-disposition': 'Content-Disposition', 'content-encoding': 'Content-Encoding', 'content-language': 'Content-Language', 'content-length': 'Content-Length', 'content-md5': 'Content-MD5', 'content-type': 'Content-Type'}
    for (url_key, header_key) in metadata_to_check.items():
        metadata_in_url = re.search((url_key + '=(.+?)(&.+$|$)'), url)
        if metadata_in_url:
            url_value = unquote(metadata_in_url.group(1))
            if ((header_key not in headers) or (url_value != headers[header_key])):
                return True
    return False
Verify whether the provided metadata in the URL is also present in the headers
:param url: .../file.txt&content-type=app%2Fjson&Signature=..
:param headers: Content-Type=app/json
:return: True or False
def _invalid_headers(self, url, headers):
    '\n        Verify whether the provided metadata in the URL is also present in the headers\n        :param url: .../file.txt&content-type=app%2Fjson&Signature=..\n        :param headers: Content-Type=app/json\n        :return: True or False\n        '
    metadata_to_check = {'content-disposition': 'Content-Disposition', 'content-encoding': 'Content-Encoding', 'content-language': 'Content-Language', 'content-length': 'Content-Length', 'content-md5': 'Content-MD5', 'content-type': 'Content-Type'}
    for (url_key, header_key) in metadata_to_check.items():
        metadata_in_url = re.search((url_key + '=(.+?)(&.+$|$)'), url)
        if metadata_in_url:
            url_value = unquote(metadata_in_url.group(1))
            if ((header_key not in headers) or (url_value != headers[header_key])):
                return True
    return False