File tree Expand file tree Collapse file tree
google-cloud-core/google/cloud/_http Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4949DEFAULT_USER_AGENT = "gcloud-python/{0}" .format (version .__version__ )
5050"""The user agent for google-cloud-python requests."""
5151
52- CLIENT_INFO_HEADER = "X-Goog-API-Client "
52+ CLIENT_INFO_HEADER = "x-goog-api-client "
5353CLIENT_INFO_TEMPLATE = "gl-python/" + platform .python_version () + " gccl/{}"
5454
5555_USER_AGENT_ALL_CAPS_DEPRECATED = """\
Original file line number Diff line number Diff line change @@ -767,7 +767,7 @@ def _get_default_headers(
767767 "Accept" : "application/json" ,
768768 "Accept-Encoding" : "gzip, deflate" ,
769769 "User-Agent" : user_agent ,
770- "X-Goog-API-Client " : x_goog_api_client ,
770+ "x-goog-api-client " : x_goog_api_client ,
771771 "content-type" : content_type ,
772772 "x-upload-content-type" : x_upload_content_type or content_type ,
773773 }
Original file line number Diff line number Diff line change @@ -2688,7 +2688,7 @@ def test__get_upload_arguments(self):
26882688 ** custom_headers ,
26892689 }
26902690 self .assertEqual (
2691- headers ["X-Goog-API-Client " ],
2691+ headers ["x-goog-api-client " ],
26922692 f"{ client ._connection .user_agent } { GCCL_INVOCATION_TEST_CONST } gccl-gcs-cmd/{ COMMAND } " ,
26932693 )
26942694 self .assertEqual (headers , expected_headers )
Original file line number Diff line number Diff line change @@ -2169,8 +2169,8 @@ def test_download_blob_have_different_uuid(self):
21692169 client .download_blob_to_file (blob , file_obj )
21702170
21712171 self .assertNotEqual (
2172- blob ._do_download .call_args_list [0 ][0 ][3 ]["X-Goog-API-Client " ],
2173- blob ._do_download .call_args_list [1 ][0 ][3 ]["X-Goog-API-Client " ],
2172+ blob ._do_download .call_args_list [0 ][0 ][3 ]["x-goog-api-client " ],
2173+ blob ._do_download .call_args_list [1 ][0 ][3 ]["x-goog-api-client " ],
21742174 )
21752175
21762176 def test_list_blobs_w_defaults_w_bucket_obj (self ):
Original file line number Diff line number Diff line change @@ -1218,7 +1218,7 @@ def test_upload_chunks_concurrently_with_metadata_and_encryption():
12181218 "Accept" : "application/json" ,
12191219 "Accept-Encoding" : "gzip, deflate" ,
12201220 "User-Agent" : "agent" ,
1221- "X-Goog-API-Client " : f"agent gccl-invocation-id/{ invocation_id } gccl-gcs-cmd/tm.upload_sharded" ,
1221+ "x-goog-api-client " : f"agent gccl-invocation-id/{ invocation_id } gccl-gcs-cmd/tm.upload_sharded" ,
12221222 "content-type" : FAKE_CONTENT_TYPE ,
12231223 "x-upload-content-type" : FAKE_CONTENT_TYPE ,
12241224 "X-Goog-Encryption-Algorithm" : "AES256" ,
You can’t perform that action at this time.
0 commit comments