summaryrefslogtreecommitdiffhomepage
path: root/middleware/gzip
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2015-07-01 19:05:31 -0600
committerMatthew Holt <[email protected]>2015-07-01 19:05:31 -0600
commit32ef35b9527f682a528c0f04872b0b89b18f4049 (patch)
tree6773c86e5c9b9490e12c674b0fb7435710f24a9f /middleware/gzip
parentabf22909f1d3c93a4a2016538431f641f7972c18 (diff)
downloadcaddy-32ef35b9527f682a528c0f04872b0b89b18f4049.tar.gz
caddy-32ef35b9527f682a528c0f04872b0b89b18f4049.zip
gzip: Fix tests
Diffstat (limited to 'middleware/gzip')
-rw-r--r--middleware/gzip/filter_test.go2
-rw-r--r--middleware/gzip/gzip_test.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/middleware/gzip/filter_test.go b/middleware/gzip/filter_test.go
index c3664cdd7..616e0612f 100644
--- a/middleware/gzip/filter_test.go
+++ b/middleware/gzip/filter_test.go
@@ -108,7 +108,7 @@ func TestMIMEFilter(t *testing.T) {
}
for i, m := range mimes {
r := urlRequest("file" + m)
- r.Header.Set("Content-Type", m)
+ r.Header.Set("Accept", m)
if !filter.ShouldCompress(r) {
t.Errorf("Test %v: Should be valid filter", i)
}
diff --git a/middleware/gzip/gzip_test.go b/middleware/gzip/gzip_test.go
index ae0e300c8..fd55f7ab1 100644
--- a/middleware/gzip/gzip_test.go
+++ b/middleware/gzip/gzip_test.go
@@ -89,7 +89,7 @@ func TestGzipHandler(t *testing.T) {
if err != nil {
t.Error(err)
}
- r.Header.Set("Content-Type", m)
+ r.Header.Set("Accept", m)
r.Header.Set("Accept-Encoding", "gzip")
_, err = gz.ServeHTTP(w, r)
if err != nil {