diff options
Diffstat (limited to 'routers/repo/download.go')
-rw-r--r-- | routers/repo/download.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/repo/download.go b/routers/repo/download.go index cb863c6133..a10792b87f 100644 --- a/routers/repo/download.go +++ b/routers/repo/download.go @@ -28,6 +28,8 @@ func ServeData(ctx *middleware.Context, name string, reader io.Reader) error { ctx.Resp.Header().Set("Content-Disposition", "attachment; filename="+path.Base(ctx.Repo.TreeName)) ctx.Resp.Header().Set("Content-Transfer-Encoding", "binary") } + } else { + ctx.Resp.Header().Set("Content-Type", "text/plain") } ctx.Resp.Write(buf) _, err := io.Copy(ctx.Resp, reader) |