summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2015-01-31 15:27:57 -0500
committerUnknwon <joe2010xtmf@163.com>2015-01-31 15:27:57 -0500
commit32152d23633c3bf3a1704212a53012d4937e519f (patch)
tree6a2066f1dc90e10de14aadfaf5e176fcecae6c67
parentfb9dcfa921d72900936ddc7533861c33d847aa00 (diff)
downloadgitea-32152d23633c3bf3a1704212a53012d4937e519f.tar.gz
gitea-32152d23633c3bf3a1704212a53012d4937e519f.zip
routers/repo: set raw page content type to 'text/plain' #828
-rw-r--r--README.md1
-rw-r--r--conf/locale/TRANSLATORS3
-rw-r--r--gogs.go2
-rw-r--r--routers/repo/download.go8
-rw-r--r--templates/.VERSION2
5 files changed, 9 insertions, 7 deletions
diff --git a/README.md b/README.md
index f85e7354fa..226f2c8777 100644
--- a/README.md
+++ b/README.md
@@ -13,6 +13,7 @@ Gogs(Go Git Service) is a painless self-hosted Git Service written in Go.
- Due to testing purpose, data of [try.gogs.io](https://try.gogs.io) has been reset in **Jan 28, 2015** and will reset multiple times after. Please do **NOT** put your important data on the site.
- Demo site [try.gogs.io](https://try.gogs.io) is running under `dev` branch.
+- If you think there are vulnerabilities in the project, please talk private to **u@gogs.io**, thanks!
#### Other language version
diff --git a/conf/locale/TRANSLATORS b/conf/locale/TRANSLATORS
index 38e4ddc274..c848b05e33 100644
--- a/conf/locale/TRANSLATORS
+++ b/conf/locale/TRANSLATORS
@@ -1,6 +1,7 @@
# This file lists all PUBLIC individuals having contributed content to the translation.
# Order of name is meaningless.
+Christoph Kisfeld <christoph.kisfeld@gmail.com>
Thomas Fanninger <gogs.thomas@fanninger.at>
Ɓukasz Jan Niemier <lukasz@niemier.pl>
-Lafriks <lafriks@gmail.com> \ No newline at end of file
+Lafriks <lafriks@gmail.com>
diff --git a/gogs.go b/gogs.go
index a3c749cea3..bdd3a8211c 100644
--- a/gogs.go
+++ b/gogs.go
@@ -17,7 +17,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)
-const APP_VER = "0.5.12.0130 Beta"
+const APP_VER = "0.5.12.0131 Beta"
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())
diff --git a/routers/repo/download.go b/routers/repo/download.go
index 6367c40e28..c5e18e005b 100644
--- a/routers/repo/download.go
+++ b/routers/repo/download.go
@@ -25,16 +25,16 @@ func ServeBlob(ctx *middleware.Context, blob *git.Blob) error {
buf = buf[:n]
}
- contentType, isTextFile := base.IsTextFile(buf)
+ _, isTextFile := base.IsTextFile(buf)
_, isImageFile := base.IsImageFile(buf)
- ctx.Resp.Header().Set("Content-Type", contentType)
+ 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")
}
ctx.Resp.Write(buf)
- io.Copy(ctx.Resp, dataRc)
- return nil
+ _, err = io.Copy(ctx.Resp, dataRc)
+ return err
}
func SingleDownload(ctx *middleware.Context) {
diff --git a/templates/.VERSION b/templates/.VERSION
index 1674af9a21..ab97c4a157 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.5.12.0130 Beta \ No newline at end of file
+0.5.12.0131 Beta \ No newline at end of file