summaryrefslogtreecommitdiff
path: root/cli/http_util.rs
diff options
context:
space:
mode:
authorKamil Ogórek <kamil.ogorek@gmail.com>2023-02-10 16:11:11 +0100
committerGitHub <noreply@github.com>2023-02-10 10:11:11 -0500
commit5778e1196e5adbae77e5a05bd7cfb4879b012739 (patch)
treec382aec5bf41584b81f0696834f1b0261dabebda /cli/http_util.rs
parent4baaa246a256a82e725ddf07015bad72ec13f3e5 (diff)
feat(install): follow redirects for urls with no path (#17449)
This change makes absolute urls, that contain no path like `deno install https://my-cli.io` to follow redirects and extract the name from it. It allows modifies `test_util` server listener on port `4550` (`REDIRECT_ABSOLUTE_PORT`) to allow for specifying `redirect_to` query param, that fill use that value for it's next redirect. Fixes https://github.com/denoland/deno/issues/17409
Diffstat (limited to 'cli/http_util.rs')
-rw-r--r--cli/http_util.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/http_util.rs b/cli/http_util.rs
index 225c49996..9476d6a5f 100644
--- a/cli/http_util.rs
+++ b/cli/http_util.rs
@@ -300,7 +300,7 @@ impl HttpClient {
.map(Some)
}
- async fn get_redirected_response<U: reqwest::IntoUrl>(
+ pub async fn get_redirected_response<U: reqwest::IntoUrl>(
&self,
url: U,
) -> Result<Response, AnyError> {