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

Issue 69860049: code review 69860049: net/http: fix location of StateHijacked and StateActive (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 3 months ago by bradfitz
Modified:
11 years, 3 months ago
Reviewers:
gobot, josharian
CC:
josharian, golang-codereviews
Visibility:
Public.

Description

net/http: fix location of StateHijacked and StateActive 1) Move StateHijacked callback earlier, to make it panic-proof. A Hijack followed by a panic didn't previously result in ConnState getting fired for StateHijacked. Move it earlier, to the time of hijack. 2) Don't fire StateActive unless any bytes were read off the wire while waiting for a request. This means we don't transition from New or Idle to Active if the client disconnects or times out. This was documented before, but not implemented properly. This CL is required for an pending fix for Issue 7264

Patch Set 1 #

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

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

Patch Set 4 : diff -r 7257b771f12b https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 7257b771f12b https://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 6 : diff -r 2750cd9fc49b https://go.googlecode.com/hg/ #

Patch Set 7 : diff -r 351f0be36880 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -6 lines) Patch
M src/pkg/net/http/serve_test.go View 1 2 3 4 5 4 chunks +53 lines, -0 lines 0 comments Download
M src/pkg/net/http/server.go View 1 2 3 4 5 5 chunks +10 lines, -6 lines 0 comments Download

Messages

Total messages: 12
bradfitz
Hello josharian@gmail.com (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 3 months ago (2014-03-03 21:13:05 UTC) #1
bradfitz
Actually I'll add a specific test for this. I also found another bad example. On ...
11 years, 3 months ago (2014-03-03 21:47:37 UTC) #2
bradfitz
Hello josharian@gmail.com (cc: golang-codereviews@googlegroups.com), Please take another look.
11 years, 3 months ago (2014-03-03 22:53:30 UTC) #3
bradfitz
Hello josharian@gmail.com (cc: golang-codereviews@googlegroups.com), Please take another look.
11 years, 3 months ago (2014-03-03 22:57:02 UTC) #4
bradfitz
(The last version adds the previously-forgotten serve_test.go ....) On Mon, Mar 3, 2014 at 2:57 ...
11 years, 3 months ago (2014-03-03 22:57:42 UTC) #5
josharian
LGTM with one nit I do wonder whether there are any other subtle cases lurking. ...
11 years, 3 months ago (2014-03-04 00:25:31 UTC) #6
josharian
Huh, lost one comment during publish. Nit: s/if the there/if there/ in the CL description ...
11 years, 3 months ago (2014-03-04 00:26:50 UTC) #7
bradfitz
Hello josharian@gmail.com (cc: golang-codereviews@googlegroups.com), Please take another look.
11 years, 3 months ago (2014-03-04 01:23:28 UTC) #8
bradfitz
PTAL. I just implemented StateActive correctly now, instead of "better". With new test and updated ...
11 years, 3 months ago (2014-03-04 01:23:50 UTC) #9
josharian
LGTM > PTAL. I just implemented StateActive correctly now, instead of "better". > With new ...
11 years, 3 months ago (2014-03-04 02:34:06 UTC) #10
bradfitz
*** Submitted as https://code.google.com/p/go/source/detail?r=7105a905bb2a *** net/http: fix location of StateHijacked and StateActive 1) Move StateHijacked ...
11 years, 3 months ago (2014-03-04 02:58:33 UTC) #11
gobot
11 years, 3 months ago (2014-03-04 03:16:48 UTC) #12
Message was sent while issue was closed.
This CL appears to have broken the windows-386-ec2 builder.
Sign in to reply to this message.

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