Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle Redirects #1502

Closed
wbond opened this issue Sep 23, 2020 · 4 comments
Closed

Handle Redirects #1502

wbond opened this issue Sep 23, 2020 · 4 comments

Comments

@wbond
Copy link
Owner

wbond commented Sep 23, 2020

All downloaders should handle HTTP codes 301, 302, 303 and 307.

@deathaxe
Copy link
Collaborator

deathaxe commented Feb 5, 2023

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 #1416 (comment)

CurlDownloader

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)

UrlLibDownloader

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)

WinINetDownloader

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?

@rchl
Copy link
Contributor

rchl commented Oct 9, 2023

The oscrypto one doesn't seem to support redirect and that's what review bot uses by default on linux and mac.

@deathaxe
Copy link
Collaborator

Interesting finding.

Maybe we should come back to wbond/package_control_channel#8050 and use your refactored reviewer via Github Actions.

@rchl
Copy link
Contributor

rchl commented Oct 10, 2023

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.

@deathaxe deathaxe added this to the Package Control 4.0 milestone Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants