Commits

brainman committed 8841bdb

net/http: use r.Body.Close to close connection during TestServeFileFromCWD

Fixes issue 3917.

R=golang-dev, bradfitz
CC=golang-dev
http://codereview.appspot.com/6553061

Comments (0)

Files changed (1)

src/pkg/net/http/fs_test.go

 }
 
 func TestServeFileFromCWD(t *testing.T) {
-	if runtime.GOOS == "windows" {
-		// TODO(brainman): find out why this test is broken
-		t.Logf("Temporarily skipping test on Windows; see http://golang.org/issue/3917")
-		return
-	}
 	ts := httptest.NewServer(HandlerFunc(func(w ResponseWriter, r *Request) {
 		ServeFile(w, r, "fs_test.go")
 	}))
 	if err != nil {
 		t.Fatal(err)
 	}
+	r.Body.Close()
 	if r.StatusCode != 200 {
 		t.Fatalf("expected 200 OK, got %s", r.Status)
 	}