diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
new file mode 100644
index 0000000..79173ae
--- /dev/null
+++ b/.github/workflows/go.yml
@@ -0,0 +1,45 @@
+name: Go
+on:
+  push:
+    branches: [master]
+  pull_request:
+env:
+  GOPROXY: "https://proxy.golang.org"
+
+jobs:
+  lint:
+    name: Lint
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - name: Run golangci-lint
+        uses: actions-contrib/golangci-lint@v1
+
+  test:
+    name: Test
+    strategy:
+      matrix:
+        go-version: [1.13.x, 1.14.x]
+        platform: [ubuntu-latest, macos-latest, windows-latest]
+    runs-on: ${{ matrix.platform }}
+    steps:
+      - name: Install Go
+        uses: actions/setup-go@v1
+        with:
+          go-version: ${{ matrix.go-version }}
+      - name: Checkout code
+        uses: actions/checkout@v2
+      - name: Run unit tests
+        run: go test -v -race -coverprofile=coverage -covermode=atomic ./...
+      - name: Upload coverage report to Codecov
+        uses: codecov/codecov-action@v1.0.6
+        with:
+          file: ./coverage
+          flags: unittests
+      - name: Cache downloaded modules
+        uses: actions/cache@v1
+        with:
+          path: ~/go/pkg/mod
+          key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
+          restore-keys: |
+            ${{ runner.os }}-go-
diff --git a/.github/workflows/lsif.yml b/.github/workflows/lsif.yml
new file mode 100644
index 0000000..dd4d948
--- /dev/null
+++ b/.github/workflows/lsif.yml
@@ -0,0 +1,17 @@
+name: LSIF
+on: [push]
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v1
+      - name: Generate LSIF data
+        uses: sourcegraph/lsif-go-action@master
+        with:
+          verbose: 'true'
+      - name: Upload LSIF data
+        uses: sourcegraph/lsif-upload-action@master
+        continue-on-error: true
+        with:
+          endpoint: https://sourcegraph.com
+          github_token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 2774fb3..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-sudo: false
-language: go
-
-go:
-  - 1.3
-  - 1.4
-  - 1.5
-  - tip
-
-script: go test -v -cover -race
-
-notifications:
-  email:
-    - u@gogs.io
diff --git a/README.md b/README.md
index 0c438a7..4fb903a 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,9 @@
-# gzip [![Build Status](https://travis-ci.org/go-macaron/gzip.svg?branch=master)](https://travis-ci.org/go-macaron/gzip) [![](http://gocover.io/_badge/github.com/go-macaron/gzip)](http://gocover.io/github.com/go-macaron/gzip)
+# gzip
+
+[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/go-macaron/gzip/Go?logo=github&style=for-the-badge)](https://github.com/go-macaron/gzip/actions?query=workflow%3AGo)
+[![codecov](https://img.shields.io/codecov/c/github/go-macaron/gzip/master?logo=codecov&style=for-the-badge)](https://codecov.io/gh/go-macaron/gzip)
+[![GoDoc](https://img.shields.io/badge/GoDoc-Reference-blue?style=for-the-badge&logo=go)](https://pkg.go.dev/github.com/go-macaron/gzip?tab=doc)
+[![Sourcegraph](https://img.shields.io/badge/view%20on-Sourcegraph-brightgreen.svg?style=for-the-badge&logo=sourcegraph)](https://sourcegraph.com/github.com/go-macaron/gzip)
 
 Middleware gzip provides compress to responses for [Macaron](https://github.com/go-macaron/macaron).
 
@@ -9,7 +14,7 @@ Middleware gzip provides compress to responses for [Macaron](https://github.com/
 ## Getting Help
 
 - [API Reference](https://gowalker.org/github.com/go-macaron/gzip)
-- [Documentation](http://go-macaron.com/docs/middlewares/gzip)
+- [Documentation](https://go-macaron.com/middlewares/gzip)
 
 ## Credits
 
@@ -17,4 +22,4 @@ This package is a modified version of [martini-contrib/gzip](https://github.com/
 
 ## License
 
-This project is under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for the full license text.
\ No newline at end of file
+This project is under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for the full license text.
diff --git a/codecov.yml b/codecov.yml
new file mode 100644
index 0000000..fc947f2
--- /dev/null
+++ b/codecov.yml
@@ -0,0 +1,9 @@
+coverage:
+  range: "60...95"
+  status:
+    project:
+      default:
+        threshold: 1%
+
+comment:
+  layout: 'diff, files'
diff --git a/debian/changelog b/debian/changelog
index 4063f09..b4c453f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
-golang-github-go-macaron-gzip (0.0~git20151014.0.4938e9b-3) UNRELEASED; urgency=medium
+golang-github-go-macaron-gzip (0.0~git20200329.0.98214d7-1) UNRELEASED; urgency=medium
 
+  [ Alexandre Viau ]
   * Point Vcs-* urls to salsa.debian.org.
 
- -- Alexandre Viau <aviau@debian.org>  Mon, 02 Apr 2018 16:54:38 -0400
+  [ Debian Janitor ]
+  * New upstream snapshot.
+
+ -- Alexandre Viau <aviau@debian.org>  Wed, 09 Mar 2022 22:06:56 -0000
 
 golang-github-go-macaron-gzip (0.0~git20151014.0.4938e9b-2) unstable; urgency=medium
 
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..0873feb
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,9 @@
+module github.com/go-macaron/gzip
+
+go 1.13
+
+require (
+	github.com/klauspost/compress v1.10.3
+	github.com/smartystreets/goconvey v1.6.4
+	gopkg.in/macaron.v1 v1.3.5
+)
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000..1fb31c2
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,33 @@
+github.com/go-macaron/inject v0.0.0-20160627170012-d8a0b8677191 h1:NjHlg70DuOkcAMqgt0+XA+NHwtu66MkTVVgR4fFWbcI=
+github.com/go-macaron/inject v0.0.0-20160627170012-d8a0b8677191/go.mod h1:VFI2o2q9kYsC4o7VP1HrEVosiZZTd+MVT3YZx4gqvJw=
+github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
+github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
+github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
+github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
+github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
+github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
+github.com/klauspost/compress v1.10.3 h1:OP96hzwJVBIHYU52pVTI6CczrxPvrGfgqF9N5eTO0Q8=
+github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
+github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
+github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
+github.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHeiJApdr3r4w=
+github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM=
+github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s=
+github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
+github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
+github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
+github.com/unknwon/com v0.0.0-20190804042917-757f69c95f3e h1:GSGeB9EAKY2spCABz6xOX5DbxZEXolK+nBSvmsQwRjM=
+github.com/unknwon/com v0.0.0-20190804042917-757f69c95f3e/go.mod h1:tOOxU81rwgoCLoOVVPHb6T/wt8HZygqH5id+GNnlCXM=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 h1:HuIa8hRrWRSrqYzx1qI49NNxhdi2PrY7gxVSq1JjLDc=
+golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+gopkg.in/ini.v1 v1.46.0 h1:VeDZbLYGaupuvIrsYCEOe/L/2Pcs5n7hdO1ZTjporag=
+gopkg.in/ini.v1 v1.46.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
+gopkg.in/macaron.v1 v1.3.5 h1:FUA16VFBojxzfU75KqWrV/6BPv9O2R1GnybSGRie9QQ=
+gopkg.in/macaron.v1 v1.3.5/go.mod h1:uMZCFccv9yr5TipIalVOyAyZQuOH3OkmXvgcWwhJuP4=
diff --git a/gzip.go b/gzip.go
index ca54ec6..251afc0 100644
--- a/gzip.go
+++ b/gzip.go
@@ -29,7 +29,6 @@ import (
 const (
 	_HEADER_ACCEPT_ENCODING  = "Accept-Encoding"
 	_HEADER_CONTENT_ENCODING = "Content-Encoding"
-	_HEADER_CONTENT_LENGTH   = "Content-Length"
 	_HEADER_CONTENT_TYPE     = "Content-Type"
 	_HEADER_VARY             = "Vary"
 )
@@ -86,7 +85,10 @@ func Gziper(options ...Options) macaron.Handler {
 		gzw := gzipResponseWriter{gz, ctx.Resp}
 		ctx.Resp = gzw
 		ctx.MapTo(gzw, (*http.ResponseWriter)(nil))
-		if ctx.Render != nil {
+
+		// Check if render middleware has been registered,
+		// if yes, we need to modify ResponseWriter for it as well.
+		if _, ok := ctx.Render.(*macaron.DummyRender); !ok {
 			ctx.Render.SetResponseWriter(gzw)
 		}
 
diff --git a/gzip_test.go b/gzip_test.go
index 8da95b6..8acee28 100644
--- a/gzip_test.go
+++ b/gzip_test.go
@@ -46,7 +46,7 @@ func Test_Gzip(t *testing.T) {
 		So(err, ShouldBeNil)
 		m.ServeHTTP(resp, req)
 
-		_, ok := resp.HeaderMap[_HEADER_CONTENT_ENCODING]
+		_, ok := resp.Result().Header[_HEADER_CONTENT_ENCODING]
 		So(ok, ShouldBeFalse)
 
 		ce := resp.Header().Get(_HEADER_CONTENT_ENCODING)
@@ -57,7 +57,7 @@ func Test_Gzip(t *testing.T) {
 		req.Header.Set(_HEADER_ACCEPT_ENCODING, "gzip")
 		m.ServeHTTP(resp, req)
 
-		_, ok = resp.HeaderMap[_HEADER_CONTENT_ENCODING]
+		_, ok = resp.Result().Header[_HEADER_CONTENT_ENCODING]
 		So(ok, ShouldBeTrue)
 
 		ce = resp.Header().Get(_HEADER_CONTENT_ENCODING)
@@ -95,7 +95,8 @@ func Test_ResponseWriter_Hijack(t *testing.T) {
 			hj, ok := rw.(http.Hijacker)
 			So(ok, ShouldBeTrue)
 
-			hj.Hijack()
+			_, _, err := hj.Hijack()
+			So(err, ShouldBeNil)
 		})
 
 		r, err := http.NewRequest("GET", "/", nil)