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

Issue 8208043: code review 8208043: net/http: Transport: be paranoid about any non-100 1xx ... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years ago by bradfitz
Modified:
11 years ago
Reviewers:
CC:
golang-dev, dsymonds
Visibility:
Public.

Description

net/http: Transport: be paranoid about any non-100 1xx response Since we can't properly handle anything except 100, treat all 1xx informational responses as sketchy and don't reuse the connection for future requests. The only other 1xx response code currently in use in the wild is WebSockets' use of "101 Switching Protocols", but our code.google.com/p/go.net/websockets doesn't use Client or Transport: it uses ReadResponse directly, so is unaffected by this CL. (and its tests still pass) So this CL is entirely just future-proofing paranoia. Also: the Internet is weird. Update Issue 2184 Update Issue 3665

Patch Set 1 #

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

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

Patch Set 4 : diff -r 282dcbf1f423 https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 282dcbf1f423 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -17 lines) Patch
M src/pkg/net/http/serve_test.go View 1 2 1 chunk +6 lines, -1 line 0 comments Download
M src/pkg/net/http/transport.go View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M src/pkg/net/http/transport_test.go View 1 2 4 chunks +47 lines, -15 lines 0 comments Download

Messages

Total messages: 3
bradfitz
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
11 years ago (2013-03-31 01:51:00 UTC) #1
dsymonds
LGTM though ignoring any error back from NewRequest in the test makes me twitch a ...
11 years ago (2013-03-31 05:24:33 UTC) #2
bradfitz
11 years ago (2013-03-31 05:59:12 UTC) #3
*** Submitted as https://code.google.com/p/go/source/detail?r=d82ec1b4fb7a ***

net/http: Transport: be paranoid about any non-100 1xx response

Since we can't properly handle anything except 100, treat all
1xx informational responses as sketchy and don't reuse the
connection for future requests.

The only other 1xx response code currently in use in the wild
is WebSockets' use of "101 Switching Protocols", but our
code.google.com/p/go.net/websockets doesn't use Client or
Transport: it uses ReadResponse directly, so is unaffected by
this CL.  (and its tests still pass)

So this CL is entirely just future-proofing paranoia.
Also: the Internet is weird.

Update Issue 2184
Update Issue 3665

R=golang-dev, dsymonds
CC=golang-dev
https://codereview.appspot.com/8208043
Sign in to reply to this message.

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