From 9c477bae194915bfd4bc8c314e90e28b9ec1c831 Mon Sep 17 00:00:00 2001 From: Andrew Bonventre Date: Fri, 10 Nov 2017 12:05:31 -0500 Subject: [PATCH] godoc: use dl.google.com instead of redirector.gvt1.com Fixes golang/go#22648 Change-Id: I59185cc1ed61235a0fcfadc060c4735372586358 Reviewed-on: https://go-review.googlesource.com/76971 Reviewed-by: Brad Fitzpatrick --- godoc/dl/dl.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/godoc/dl/dl.go b/godoc/dl/dl.go index 7a6fe3316a..83cdb482ab 100644 --- a/godoc/dl/dl.go +++ b/godoc/dl/dl.go @@ -35,9 +35,9 @@ import ( ) const ( - edgeCacheBaseURL = "https://redirector.gvt1.com/edgedl/go/" - cacheKey = "download_list_3" // increment if listTemplateData changes - cacheDuration = time.Hour + downloadBaseURL = "https://dl.google.com/go/" + cacheKey = "download_list_3" // increment if listTemplateData changes + cacheDuration = time.Hour ) func RegisterHandlers(mux *http.ServeMux) { @@ -133,7 +133,7 @@ func (f File) Highlight() bool { } func (f File) URL() string { - return edgeCacheBaseURL + f.Filename + return downloadBaseURL + f.Filename } type Release struct { @@ -424,7 +424,7 @@ func getHandler(w http.ResponseWriter, r *http.Request) { http.NotFound(w, r) return } - http.Redirect(w, r, edgeCacheBaseURL+name, http.StatusFound) + http.Redirect(w, r, downloadBaseURL+name, http.StatusFound) } func validUser(user string) bool {