Skip to content

Commit

Permalink
Teach oscrypto downloader to handle 302 redirects
Browse files Browse the repository at this point in the history
Fixes #1502
  • Loading branch information
deathaxe committed Oct 11, 2023
1 parent 7e98953 commit a7fc33c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package_control/downloaders/oscrypto_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit a7fc33c

Please sign in to comment.