Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2374)

Issue 94740044: code review 94740044: net/http, strings, bytes: fix http race, revert part of... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years ago by bradfitz
Modified:
10 years ago
Reviewers:
ruiu, iant
CC:
iant, ruiu, golang-codereviews, gri
Visibility:
Public.

Description

net/http, strings, bytes: fix http race, revert part of Reader behavior change I fixed this data race regression in two ways: in net/http itself, and also partially reverting the change from https://codereview.appspot.com/77580046 . Previously a Read from a strings.Reader or bytes.Reader returning 0 bytes would not be a memory write. After 77580046 it was. This reverts that back in case others depended on that. Also adds tests. Fixes Issue 7856

Patch Set 1 #

Patch Set 2 : diff -r f613443bb13a https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r f613443bb13a https://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 4 : diff -r 9eacb9c0d810 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -8 lines) Patch
M src/pkg/bytes/reader.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/bytes/reader_test.go View 1 2 chunks +22 lines, -1 line 0 comments Download
M src/pkg/net/http/serve_test.go View 1 2 3 1 chunk +33 lines, -0 lines 0 comments Download
M src/pkg/net/http/server.go View 1 1 chunk +11 lines, -4 lines 0 comments Download
M src/pkg/strings/reader.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/strings/reader_test.go View 1 1 chunk +21 lines, -0 lines 0 comments Download
M src/pkg/strings/strings_test.go View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4
bradfitz
Hello iant@golang.org (cc: golang-codereviews@googlegroups.com, gri@golang.org, ruiu@google.com), I'd like you to review this change to https://go.googlecode.com/hg/
10 years ago (2014-04-24 17:25:21 UTC) #1
ruiu
LGTM
10 years ago (2014-04-24 17:43:54 UTC) #2
iant
LGTM https://codereview.appspot.com/94740044/diff/30001/src/pkg/net/http/serve_test.go File src/pkg/net/http/serve_test.go (right): https://codereview.appspot.com/94740044/diff/30001/src/pkg/net/http/serve_test.go#newcode2493 src/pkg/net/http/serve_test.go:2493: t.Errorf("handler ran %d times; want 2", reqs) This ...
10 years ago (2014-04-25 00:13:48 UTC) #3
bradfitz
10 years ago (2014-04-25 13:44:54 UTC) #4
*** Submitted as https://code.google.com/p/go/source/detail?r=acf346c00e56 ***

net/http, strings, bytes: fix http race, revert part of Reader behavior change

I fixed this data race regression in two ways: in net/http itself, and also
partially reverting the change from https://codereview.appspot.com/77580046 .
Previously a Read from a strings.Reader or bytes.Reader returning 0 bytes
would not be a memory write. After 77580046 it was. This reverts that back
in case others depended on that. Also adds tests.

Fixes Issue 7856

LGTM=ruiu, iant
R=iant, ruiu
CC=golang-codereviews, gri
https://codereview.appspot.com/94740044
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b