Skip to content

Commit aa97a5b

Browse files
committed
Set content-type when fetching artifact data
1 parent abe81bf commit aa97a5b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test_elasticsearch_serverless/test_server/test_rest_api_spec.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,13 @@ def remove_implicit_resolver(cls, tag_to_remove):
593593
)
594594

595595
# Download the zip and start reading YAML from the files in memory
596-
package_zip = zipfile.ZipFile(io.BytesIO(http.request("GET", package_url).data))
596+
package_zip = zipfile.ZipFile(
597+
io.BytesIO(
598+
http.request(
599+
"GET", package_url, headers={"content-type": "application/json"}
600+
).data
601+
)
602+
)
597603
for yaml_file in package_zip.namelist():
598604
if not re.match(r"^rest-api-spec/test/.*\.ya?ml$", yaml_file):
599605
continue

0 commit comments

Comments
 (0)