Skip to content

Commit

Permalink
fix: Error when x-goog-signature not included. Needed to check if key…
Browse files Browse the repository at this point in the history
… exists.
  • Loading branch information
williambrode committed Dec 9, 2021
1 parent b27fd28 commit 1047680
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion google/resumable_media/_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ def _prepare_initiate_request(
# Signed URL requires content type set directly - not through x-upload-content-type
parse_result = urllib.parse.urlparse(self.upload_url)
parsed_query = urllib.parse.parse_qs(parse_result.query)
if parsed_query["x-goog-signature"] != "":
if "x-goog-signature" in parsed_query or "X-Goog-Signature" in parsed_query:
headers = {
_CONTENT_TYPE_HEADER: content_type
}
Expand Down

0 comments on commit 1047680

Please sign in to comment.