Skip to content

Commit aef3007

Browse files
authored
Fix go-get content type (#3426)
1 parent 7af8197 commit aef3007

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/context/context.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,9 @@ func Contexter() macaron.Handler {
189189
branchName = repo.DefaultBranch
190190
}
191191
prefix := setting.AppURL + path.Join(ownerName, repoName, "src", "branch", branchName)
192-
c.PlainText(http.StatusOK, []byte(com.Expand(`<!doctype html>
192+
c.Header().Set("Content-Type", "text/html")
193+
c.WriteHeader(http.StatusOK)
194+
c.Write([]byte(com.Expand(`<!doctype html>
193195
<html>
194196
<head>
195197
<meta name="go-import" content="{GoGetImport} git {CloneLink}">

0 commit comments

Comments
 (0)