FAQ
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)
}

Search Discussions

  • Dave Cheney at Nov 2, 2012 at 3:24 pm
    LGTM.

    More and more I wish there was a finaliser on res.Body() that panic'd
    if it wasn't closed.
    On Sat, Nov 3, 2012 at 1:27 AM, wrote:
    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)
    }
  • Russ Cox at Nov 2, 2012 at 8:22 pm
    LGTM
  • Dvyukov at Nov 2, 2012 at 8:31 pm
    *** Submitted as
    http://code.google.com/p/go/source/detail?r=311b51675518 ***

    net/http: fix data race in test
    The issue is that server still sends body,
    when client closes the fd.
    Fixes issue 4329.

    R=golang-dev, dave, rsc
    CC=golang-dev
    http://codereview.appspot.com/6822072


    http://codereview.appspot.com/6822072/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedNov 2, '12 at 2:27p
activeNov 2, '12 at 8:31p
posts4
users3
websitegolang.org

3 users in discussion

Dvyukov: 2 posts Dave Cheney: 1 post Russ Cox: 1 post

People

Translate

site design / logo © 2021 Grokbase