[extractor] Fix _create_request when headers is None

Closes #4164
This commit is contained in:
pukkandan 2022-06-25 19:41:22 +05:30
parent 74900105be
commit c043c24625
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39
2 changed files with 7 additions and 7 deletions

View file

@ -3015,9 +3015,9 @@ def update_url_query(url, query):
query=urllib.parse.urlencode(qs, True)))
def update_Request(req, url=None, data=None, headers={}, query={}):
def update_Request(req, url=None, data=None, headers=None, query=None):
req_headers = req.headers.copy()
req_headers.update(headers)
req_headers.update(headers or {})
req_data = data or req.data
req_url = update_url_query(url or req.get_full_url(), query)
req_get_method = req.get_method()