From ab9c5fb5e7f7b04580e2c53ae08bed3f6623316f Mon Sep 17 00:00:00 2001
From: Unknwon <u@gogs.io>
Date: Fri, 5 Aug 2016 18:34:13 -0700
Subject: [PATCH] #2593 allow render raw content

Use URL query parameter render=1 to render content in raw mode.
---
 .gopmfile                | 2 +-
 README.md                | 2 +-
 cmd/web.go               | 2 +-
 glide.lock               | 2 +-
 gogs.go                  | 2 +-
 routers/repo/download.go | 2 +-
 templates/.VERSION       | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/.gopmfile b/.gopmfile
index 05001183ea..ac33d7c5cf 100644
--- a/.gopmfile
+++ b/.gopmfile
@@ -50,7 +50,7 @@ gopkg.in/bufio.v1 = commit:567b2bf
 gopkg.in/gomail.v2 = commit:81ebce5
 gopkg.in/ini.v1 = commit:cf53f92
 gopkg.in/ldap.v2 = commit:537128f
-gopkg.in/macaron.v1 = commit:2133042
+gopkg.in/macaron.v1 = commit:7564489
 gopkg.in/redis.v2 = commit:e617904
 
 [res]
diff --git a/README.md b/README.md
index 1a156448ba..96754cd22f 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra
 
 ![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true)
 
-##### Current tip version: 0.9.63 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions)
+##### Current tip version: 0.9.64 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions)
 
 | Web | UI  | Preview  |
 |:-------------:|:-------:|:-------:|
diff --git a/cmd/web.go b/cmd/web.go
index 39e297ee34..4c4dbe94e9 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -86,7 +86,7 @@ func checkVersion() {
 		{"github.com/go-macaron/session", session.Version, "0.1.6"},
 		{"github.com/go-macaron/toolbox", toolbox.Version, "0.1.0"},
 		{"gopkg.in/ini.v1", ini.Version, "1.8.4"},
-		{"gopkg.in/macaron.v1", macaron.Version, "1.1.4"},
+		{"gopkg.in/macaron.v1", macaron.Version, "1.1.7"},
 		{"github.com/gogits/git-module", git.Version, "0.3.3"},
 		{"github.com/gogits/go-gogs-client", gogs.Version, "0.10.1"},
 	}
diff --git a/glide.lock b/glide.lock
index 2911113251..4a67b551db 100644
--- a/glide.lock
+++ b/glide.lock
@@ -142,7 +142,7 @@ imports:
 - name: gopkg.in/ldap.v2
   version: 537128fee7cca108d8ce74e4309fdfcdd9c7f496
 - name: gopkg.in/macaron.v1
-  version: 2133042f8d1022b8253e4e23f7940467941409ce
+  version: 7564489a79f3f96b7ac8034652b35eeebb468eb4
 - name: gopkg.in/redis.v2
   version: e6179049628164864e6e84e973cfb56335748dea
 devImports: []
diff --git a/gogs.go b/gogs.go
index a13353588c..9e597810da 100644
--- a/gogs.go
+++ b/gogs.go
@@ -17,7 +17,7 @@ import (
 	"github.com/gogits/gogs/modules/setting"
 )
 
-const APP_VER = "0.9.63.0805"
+const APP_VER = "0.9.64.0805"
 
 func init() {
 	runtime.GOMAXPROCS(runtime.NumCPU())
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)
diff --git a/templates/.VERSION b/templates/.VERSION
index 0db44e5c64..8b8b4b5d1d 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.9.63.0805
\ No newline at end of file
+0.9.64.0805
\ No newline at end of file