@@ -13,7 +13,7 @@ import (
1313)
1414
1515func TestCacheControl_MiddlewareDefault (t * testing.T ) {
16- req := httptest .NewRequest ("GET" , "/file.html" , nil )
16+ req := httptest .NewRequest ("GET" , "/file.html" , http . NoBody )
1717 w := httptest .NewRecorder ()
1818
1919 h := NewCacheControl (time .Hour ).Middleware (http .HandlerFunc (func (w http.ResponseWriter , r * http.Request ) {
@@ -26,7 +26,7 @@ func TestCacheControl_MiddlewareDefault(t *testing.T) {
2626}
2727
2828func TestCacheControl_MiddlewareDisabled (t * testing.T ) {
29- req := httptest .NewRequest ("GET" , "/file.html" , nil )
29+ req := httptest .NewRequest ("GET" , "/file.html" , http . NoBody )
3030 w := httptest .NewRecorder ()
3131
3232 h := NewCacheControl (0 ).Middleware (http .HandlerFunc (func (w http.ResponseWriter , r * http.Request ) {
@@ -48,7 +48,7 @@ func TestCacheControl_MiddlewareMime(t *testing.T) {
4848 }))
4949
5050 {
51- req := httptest .NewRequest ("GET" , "/file.html" , nil )
51+ req := httptest .NewRequest ("GET" , "/file.html" , http . NoBody )
5252 w := httptest .NewRecorder ()
5353 h .ServeHTTP (w , req )
5454 resp := w .Result ()
@@ -57,7 +57,7 @@ func TestCacheControl_MiddlewareMime(t *testing.T) {
5757 }
5858
5959 {
60- req := httptest .NewRequest ("GET" , "/xyz/file.png?something=blah" , nil )
60+ req := httptest .NewRequest ("GET" , "/xyz/file.png?something=blah" , http . NoBody )
6161 w := httptest .NewRecorder ()
6262 h .ServeHTTP (w , req )
6363 resp := w .Result ()
@@ -66,7 +66,7 @@ func TestCacheControl_MiddlewareMime(t *testing.T) {
6666 }
6767
6868 {
69- req := httptest .NewRequest ("GET" , "/xyz/file.gif?something=blah" , nil )
69+ req := httptest .NewRequest ("GET" , "/xyz/file.gif?something=blah" , http . NoBody )
7070 w := httptest .NewRecorder ()
7171 h .ServeHTTP (w , req )
7272 resp := w .Result ()
@@ -75,7 +75,7 @@ func TestCacheControl_MiddlewareMime(t *testing.T) {
7575 }
7676
7777 {
78- req := httptest .NewRequest ("GET" , "/xyz/" , nil )
78+ req := httptest .NewRequest ("GET" , "/xyz/" , http . NoBody )
7979 w := httptest .NewRecorder ()
8080 h .ServeHTTP (w , req )
8181 resp := w .Result ()
0 commit comments