]> source.dussan.org Git - gitea.git/commitdiff
Fix gzip
authorUnknwon <joe2010xtmf@163.com>
Mon, 13 Oct 2014 22:04:07 +0000 (18:04 -0400)
committerUnknwon <joe2010xtmf@163.com>
Mon, 13 Oct 2014 22:04:07 +0000 (18:04 -0400)
.gopmfile
cmd/web.go
conf/app.ini

index 8f13d5157b373ba13d88b7e3513d6aab97a03676..2455f1041d4064d106772b4ce28bf69a8465913f 100644 (file)
--- a/.gopmfile
+++ b/.gopmfile
@@ -7,8 +7,8 @@ github.com/beego/redigo = commit:856744a0d5
 github.com/Unknwon/cae = commit:2e70a1351b
 github.com/Unknwon/com = commit:2cbcbc6916
 github.com/Unknwon/goconfig = commit:0f8d8dc1c0
-github.com/Unknwon/i18n = commit:47baeff8d0
-github.com/Unknwon/macaron = commit:4927b78ad9
+github.com/Unknwon/i18n = 
+github.com/Unknwon/macaron = 
 github.com/codegangsta/cli = commit:7381bc4e62
 github.com/go-sql-driver/mysql = commit:8111ee3ec3
 github.com/go-xorm/core = commit:750aae0fa5
@@ -18,9 +18,9 @@ github.com/gogits/oauth2 = commit:99cbec870a
 github.com/lib/pq = commit:b021d0ef20
 github.com/macaron-contrib/cache = commit:204d8e5137
 github.com/macaron-contrib/captcha = commit:d37d37eeea
-github.com/macaron-contrib/csrf = commit:8e980822b0
+github.com/macaron-contrib/csrf = 
 github.com/macaron-contrib/i18n = commit:2246f45894
-github.com/macaron-contrib/session = commit:42ad41e323
+github.com/macaron-contrib/session = 
 github.com/macaron-contrib/toolbox = commit:57127bcc89
 github.com/mattn/go-sqlite3 = commit:a80c27ba33
 github.com/nfnt/resize = commit:581d15cb53
index 395658f6ed81f1319ca91cb4d4c5528f40f12750..f5843f5f393b0dd533650e669e04e835de536bee 100644 (file)
@@ -63,7 +63,7 @@ func checkVersion() {
 
        // Check dependency version.
        macaronVer := git.MustParseVersion(strings.Join(strings.Split(macaron.Version(), ".")[:3], "."))
-       if macaronVer.LessThan(git.MustParseVersion("0.2.0")) {
+       if macaronVer.LessThan(git.MustParseVersion("0.2.3")) {
                log.Fatal(4, "Package macaron version is too old, did you forget to update?(github.com/Unknwon/macaron)")
        }
        i18nVer := git.MustParseVersion(i18n.Version())
@@ -81,15 +81,15 @@ func newMacaron() *macaron.Macaron {
        m := macaron.New()
        m.Use(macaron.Logger())
        m.Use(macaron.Recovery())
+       if setting.EnableGzip {
+               m.Use(macaron.Gziper())
+       }
        m.Use(macaron.Static(
                path.Join(setting.StaticRootPath, "public"),
                macaron.StaticOptions{
                        SkipLogging: !setting.DisableRouterLog,
                },
        ))
-       // if setting.EnableGzip {
-       //      m.Use(macaron.Gzip())
-       // }
        m.Use(macaron.Renderer(macaron.RenderOptions{
                Directory:  path.Join(setting.StaticRootPath, "templates"),
                Funcs:      []template.FuncMap{base.TemplateFuncs},
index d8bbeb70a4ef7f4d28616c362699b2834c2c11d1..79f440dd4d39e3c0cbc5d6b2fafdcb846c65e7ab 100644 (file)
@@ -28,7 +28,7 @@ KEY_FILE = custom/https/key.pem
 ; default is the path where Gogs is executed
 STATIC_ROOT_PATH =
 ; Application level GZIP support
-#ENABLE_GZIP = false
+ENABLE_GZIP = false
 
 [database]
 ; Either "mysql", "postgres" or "sqlite3", it's your choice