Reviewers: golang-dev_googlegroups.com,
Message:
Hello golang-dev@googlegroups.com,
I'd like you to review this change to
https://dvyukov%40google.com@code.google.com/p/go/
Description:
net/http: fix data race in test
The issue is that server still sends body,
when client closes the fd.
Fixes issue 4329.
Please review this at http://codereview.appspot.com/6822072/
Affected files:
M src/pkg/net/http/fs_test.go
Index: src/pkg/net/http/fs_test.go
===================================================================
--- a/src/pkg/net/http/fs_test.go
+++ b/src/pkg/net/http/fs_test.go
@@ -648,6 +648,8 @@
if err != nil {
t.Fatal(err)
}
+ io.Copy(ioutil.Discard, res.Body)
+ res.Body.Close()
if res.StatusCode != tt.wantStatus {
t.Errorf("test %q: status = %d; want %d", testName, res.StatusCode,
tt.wantStatus)
}