summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2018-01-29 19:50:04 +0200
committerGitHub <noreply@github.com>2018-01-29 19:50:04 +0200
commitaef30071c9cc76fff3baa92e4a92833d252cd0e6 (patch)
tree749d7bd9101062aa0335a7335da1f9702c5c5522 /modules
parent7af81973cbfee15861afb14ca2fb813944489949 (diff)
downloadgitea-aef30071c9cc76fff3baa92e4a92833d252cd0e6.tar.gz
gitea-aef30071c9cc76fff3baa92e4a92833d252cd0e6.zip
Fix go-get content type (#3426)
Diffstat (limited to 'modules')
-rw-r--r--modules/context/context.go4
1 files changed, 3 insertions, 1 deletions
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(`<!doctype html>
+ c.Header().Set("Content-Type", "text/html")
+ c.WriteHeader(http.StatusOK)
+ c.Write([]byte(com.Expand(`<!doctype html>
<html>
<head>
<meta name="go-import" content="{GoGetImport} git {CloneLink}">