Closed wbond closed 9 months ago
It appears package_control's downloaders handle redirects well already.
Tested on ST 3143 and 4147 on Windows, running PC on python 3.3 as well as on 3.8
All of the following expressions, executed via ST's console handle 302 and download the requested file as expected. A detailed log to proove that can be found at https://github.com/wbond/package_control/issues/1416#issuecomment-1418250919
from package_control.downloaders.curl_downloader import CurlDownloader;dl = CurlDownloader({"debug": True});data = dl.download("https://github.com/SublimeText/Liquid/releases/download/2.1.2/Liquid-2.1.2-st4126.sublime-package", "", 5.0, 1)
from package_control.downloaders.urllib_downloader import UrlLibDownloader;dl = UrlLibDownloader({"debug": True});data = dl.download("https://github.com/SublimeText/Liquid/releases/download/2.1.2/Liquid-2.1.2-st4126.sublime-package", "", 5.0, 1)
from package_control.downloaders.wininet_downloader import WinINetDownloader;dl = WinINetDownloader({"debug": True});data = dl.download("https://github.com/SublimeText/Liquid/releases/download/2.1.2/Liquid-2.1.2-st4126.sublime-package", "", 5.0, 1)
Are there any examples or sceanarios which are not covered by the current implementation?
The oscrypto
one doesn't seem to support redirect and that's what review bot uses by default on linux and mac.
Interesting finding.
Maybe we should come back to https://github.com/wbond/package_control_channel/issues/8050 and use your refactored reviewer via Github Actions.
I don't see why not. Just someone needs to do it.
The actions should probably be moved to some sublime-text specific repo rather than living in sublime_lsp org.
All downloaders should handle HTTP codes 301, 302, 303 and 307.