diff options
Diffstat (limited to 'routers/repo/download.go')
-rw-r--r-- | routers/repo/download.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/repo/download.go b/routers/repo/download.go index acf250acfb..e9468aa06d 100644 --- a/routers/repo/download.go +++ b/routers/repo/download.go @@ -28,7 +28,7 @@ func ServeData(ctx *context.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 { + } else if !ctx.QueryBool("render") { ctx.Resp.Header().Set("Content-Type", "text/plain; charset=utf-8") } ctx.Resp.Write(buf) |