Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
DEFAULT_USER_AGENT = "gcloud-python/{0}".format(version.__version__)
"""The user agent for google-cloud-python requests."""

CLIENT_INFO_HEADER = "X-Goog-API-Client"
CLIENT_INFO_HEADER = "x-goog-api-client"
CLIENT_INFO_TEMPLATE = "gl-python/" + platform.python_version() + " gccl/{}"

_USER_AGENT_ALL_CAPS_DEPRECATED = """\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ def _get_default_headers(
"Accept": "application/json",
"Accept-Encoding": "gzip, deflate",
"User-Agent": user_agent,
"X-Goog-API-Client": x_goog_api_client,
"x-goog-api-client": x_goog_api_client,
"content-type": content_type,
"x-upload-content-type": x_upload_content_type or content_type,
}
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-storage/tests/unit/test_blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -2688,7 +2688,7 @@ def test__get_upload_arguments(self):
**custom_headers,
}
self.assertEqual(
headers["X-Goog-API-Client"],
headers["x-goog-api-client"],
f"{client._connection.user_agent} {GCCL_INVOCATION_TEST_CONST} gccl-gcs-cmd/{COMMAND}",
)
self.assertEqual(headers, expected_headers)
Expand Down
4 changes: 2 additions & 2 deletions packages/google-cloud-storage/tests/unit/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2169,8 +2169,8 @@ def test_download_blob_have_different_uuid(self):
client.download_blob_to_file(blob, file_obj)

self.assertNotEqual(
blob._do_download.call_args_list[0][0][3]["X-Goog-API-Client"],
blob._do_download.call_args_list[1][0][3]["X-Goog-API-Client"],
blob._do_download.call_args_list[0][0][3]["x-goog-api-client"],
blob._do_download.call_args_list[1][0][3]["x-goog-api-client"],
)

def test_list_blobs_w_defaults_w_bucket_obj(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,7 @@ def test_upload_chunks_concurrently_with_metadata_and_encryption():
"Accept": "application/json",
"Accept-Encoding": "gzip, deflate",
"User-Agent": "agent",
"X-Goog-API-Client": f"agent gccl-invocation-id/{invocation_id} gccl-gcs-cmd/tm.upload_sharded",
"x-goog-api-client": f"agent gccl-invocation-id/{invocation_id} gccl-gcs-cmd/tm.upload_sharded",
"content-type": FAKE_CONTENT_TYPE,
"x-upload-content-type": FAKE_CONTENT_TYPE,
"X-Goog-Encryption-Algorithm": "AES256",
Expand Down
Loading