From 35bd1cedfcb4b8eeb9293895dc02ac9203c5f718 Mon Sep 17 00:00:00 2001 From: Ina Panova Date: Tue, 18 Jun 2024 13:37:27 +0200 Subject: [PATCH] Include `application/octet-stream` in the accept headers to be able to download content from OSP undercloud registry. More info https://issues.redhat.com/browse/SAT-25848 [noissue] --- pulp_container/app/downloaders.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pulp_container/app/downloaders.py b/pulp_container/app/downloaders.py index 3b55458f1..72656b74a 100644 --- a/pulp_container/app/downloaders.py +++ b/pulp_container/app/downloaders.py @@ -51,6 +51,10 @@ async def _run(self, handle_401=True, extra_data=None): # can download manifests, namely in the repair core task # FIXME this can be rolledback after https://github.com/pulp/pulp_container/issues/1288 headers = V2_ACCEPT_HEADERS + # Usually webservers ignore accept headers for blob endpoint + # However, some webservers when serving blobs need to have explicitly specified octet-stream + # in the accept headers + headers["Accept"] = headers["Accept"] + ",application/octet-stream" repo_name = None if extra_data is not None: headers = extra_data.get("headers", headers)