From 03ae49d9fe6db5b5735b33c94d1d5cf680fa3288 Mon Sep 17 00:00:00 2001 From: asim-shrestha Date: Fri, 13 Dec 2024 14:17:22 -0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Don't=20normalize=20S3=20urls?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/harambe_core/normalize_url.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/harambe_core/normalize_url.py b/core/harambe_core/normalize_url.py index 8ebc4aa..e18e57b 100644 --- a/core/harambe_core/normalize_url.py +++ b/core/harambe_core/normalize_url.py @@ -14,6 +14,8 @@ def normalize_url(path: str, base_path: str | None) -> str: if not is_s3_url(path): # We append actual URLs at the end of S3 urls occasionally # Normalization will turn https:// into http:/ + # TODO: When we handle dynamic downloads in our worker, we need to remove this logic + # we should also remove s3 as an allowed scheme all together path = _normalize(path) escaped_path = path.replace(" ", "%20")