1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Merge pull request #1249 from donbowman/master

in routers/repo/download.go, don't set mime type, let go figure it out.
This commit is contained in:
无闻
2015-07-25 00:41:22 +08:00
2 changed files with 1 additions and 2 deletions

View File

@@ -27,7 +27,6 @@ func ServeBlob(ctx *middleware.Context, blob *git.Blob) error {
_, isTextFile := base.IsTextFile(buf)
_, isImageFile := base.IsImageFile(buf)
ctx.Resp.Header().Set("Content-Type", "text/plain")
if !isTextFile && !isImageFile {
ctx.Resp.Header().Set("Content-Disposition", "attachment; filename="+path.Base(ctx.Repo.TreeName))
ctx.Resp.Header().Set("Content-Transfer-Encoding", "binary")