mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-21 02:47:14 +08:00
gzip: Fix tests
This commit is contained in:
parent
abf22909f1
commit
32ef35b952
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user