mirror of
https://github.com/harness/drone.git
synced 2025-05-05 23:42:57 +00:00
feat:[AH-1260]: fix for yarn package install (#3747)
* feat:[AH-1260]: fix for yarn package install * Merge branch 'main' of https://git0.harness.io/l7B_kbSEQD2wjrM7PShm5w/PROD/Harness_Commons/gitness * Merge branch 'main' of https://git0.harness.io/l7B_kbSEQD2wjrM7PShm5w/PROD/Harness_Commons/gitness * Merge branch 'main' of https://git0.harness.io/l7B_kbSEQD2wjrM7PShm5w/PROD/Harness_Commons/gitness * Merge branch 'main' of https://git0.harness.io/l7B_kbSEQD2wjrM7PShm5w/PROD/Harness_Commons/gitness * Merge branch 'main' of https://git0.harness.io/l7B_kbSEQD2wjrM7PShm5w/PROD/Harness_Commons/gitness * Merge branch 'release/registry-api_1.18.0' of https://git0.harness.io/l7B_kbSEQD2wjrM7PShm5w/PROD/Harness_Commons/gitness * feat:[AH-1083]: url fix (#3669) * feat:[AH-1083]: url fix
This commit is contained in:
parent
5aef4f53f8
commit
8311ae2c2f
@ -57,7 +57,7 @@ func (h *handler) DownloadPackageFile(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
w.Header().Set("Content-Disposition", "attachment; filename="+info.Filename)
|
w.Header().Set("Content-Disposition", "attachment; filename="+info.Filename)
|
||||||
if response.RedirectURL != "" {
|
if response.RedirectURL != "" {
|
||||||
http.Redirect(w, r, response.RedirectURL, http.StatusTemporaryRedirect)
|
http.Redirect(w, r, response.RedirectURL, http.StatusFound)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
err := commons.ServeContent(w, r, response.Body, info.Filename, response.ReadCloser)
|
err := commons.ServeContent(w, r, response.Body, info.Filename, response.ReadCloser)
|
||||||
|
@ -50,7 +50,7 @@ func (h *handler) DownloadPackageFileByName(w http.ResponseWriter, r *http.Reque
|
|||||||
|
|
||||||
w.Header().Set("Content-Disposition", "attachment; filename="+info.Filename)
|
w.Header().Set("Content-Disposition", "attachment; filename="+info.Filename)
|
||||||
if response.RedirectURL != "" {
|
if response.RedirectURL != "" {
|
||||||
http.Redirect(w, r, response.RedirectURL, http.StatusTemporaryRedirect)
|
http.Redirect(w, r, response.RedirectURL, http.StatusFound)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
h.ServeContent(w, r, response.Body, info.Filename)
|
h.ServeContent(w, r, response.Body, info.Filename)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user