diff --git a/middleware/gzip/filter_test.go b/middleware/gzip/filter_test.go index c3664cdd..616e0612 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 ae0e300c..fd55f7ab 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 {