From aef30071c9cc76fff3baa92e4a92833d252cd0e6 Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Mon, 29 Jan 2018 19:50:04 +0200 Subject: [PATCH] Fix go-get content type (#3426) --- modules/context/context.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/context/context.go b/modules/context/context.go index 77128b8780..311186e644 100644 --- a/modules/context/context.go +++ b/modules/context/context.go @@ -189,7 +189,9 @@ func Contexter() macaron.Handler { branchName = repo.DefaultBranch } prefix := setting.AppURL + path.Join(ownerName, repoName, "src", "branch", branchName) - c.PlainText(http.StatusOK, []byte(com.Expand(` + c.Header().Set("Content-Type", "text/html") + c.WriteHeader(http.StatusOK) + c.Write([]byte(com.Expand(`