From a7fc33cbf34ae1197852314bd9a5975344289b2b Mon Sep 17 00:00:00 2001 From: deathaxe Date: Wed, 11 Oct 2023 12:09:41 +0200 Subject: [PATCH] Teach oscrypto downloader to handle 302 redirects Fixes #1502 --- package_control/downloaders/oscrypto_downloader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package_control/downloaders/oscrypto_downloader.py b/package_control/downloaders/oscrypto_downloader.py index 7d6346cc..93791149 100644 --- a/package_control/downloaders/oscrypto_downloader.py +++ b/package_control/downloaders/oscrypto_downloader.py @@ -171,7 +171,7 @@ def download(self, url, error_message, timeout, tries, prefer_cached=False): if code == 304: return self.cache_result('get', url, code, resp_headers, b'') - if code == 301: + if code == 301 or code == 302: location = resp_headers.get('location') if not isinstance(location, str): raise OscryptoDownloaderException('Missing or duplicate Location HTTP header')