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

Issue 6448154: code review 6448154: net/http: Set TLSClientConfig.ServerName on every HTTP ... (Closed)

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

Description

net/http: Set TLSClientConfig.ServerName on every HTTP request. This makes SNI "just work" for callers using the standard http.Client. Since we now have a test that depends on the httptest.Server cert, change the cert to be a CA (keeping all other fields the same).

Patch Set 1 #

Patch Set 2 : diff -r 9bc8fafec2f5 https://code.google.com/p/go #

Patch Set 3 : diff -r 9bc8fafec2f5 https://code.google.com/p/go #

Patch Set 4 : diff -r 9bc8fafec2f5 https://code.google.com/p/go #

Patch Set 5 : diff -r 9bc8fafec2f5 https://code.google.com/p/go #

Patch Set 6 : diff -r 9bc8fafec2f5 https://code.google.com/p/go #

Patch Set 7 : diff -r 9bc8fafec2f5 https://code.google.com/p/go #

Patch Set 8 : diff -r 9bc8fafec2f5 https://code.google.com/p/go #

Total comments: 8

Patch Set 9 : diff -r 9bc8fafec2f5 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -8 lines) Patch
M src/pkg/net/http/client_test.go View 1 2 3 4 5 6 7 8 2 chunks +47 lines, -0 lines 0 comments Download
M src/pkg/net/http/httptest/server.go View 1 2 3 4 5 6 7 1 chunk +7 lines, -7 lines 0 comments Download
M src/pkg/net/http/transport.go View 1 2 3 4 5 6 7 8 1 chunk +12 lines, -1 line 0 comments Download

Messages

Total messages: 18
dborowitz
Hello dsymonds (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
11 years, 8 months ago (2012-08-15 19:15:39 UTC) #1
dborowitz
This includes my attempt at a test. However, I'm unable to get the client's TLS ...
11 years, 8 months ago (2012-08-15 19:19:01 UTC) #2
dborowitz
Hello dsymonds@golang.org (cc: agl1, golang-dev@googlegroups.com), Please take another look.
11 years, 8 months ago (2012-08-15 19:19:34 UTC) #3
agl1
On Wed, Aug 15, 2012 at 12:19 PM, <dborowitz@google.com> wrote: > Note that I do ...
11 years, 8 months ago (2012-08-15 19:34:13 UTC) #4
dborowitz
On Wed, Aug 15, 2012 at 12:34 PM, Adam Langley <agl@golang.org> wrote: > On Wed, ...
11 years, 8 months ago (2012-08-15 19:38:52 UTC) #5
agl1
On Wed, Aug 15, 2012 at 12:38 PM, Dave Borowitz <dborowitz@google.com> wrote: > I don't ...
11 years, 8 months ago (2012-08-15 19:45:48 UTC) #6
dborowitz
On Wed, Aug 15, 2012 at 12:45 PM, Adam Langley <agl@golang.org> wrote: > On Wed, ...
11 years, 8 months ago (2012-08-15 19:53:35 UTC) #7
agl1
On Wed, Aug 15, 2012 at 12:53 PM, Dave Borowitz <dborowitz@google.com> wrote: > Will do, ...
11 years, 8 months ago (2012-08-15 19:56:57 UTC) #8
dborowitz
Hello dsymonds@golang.org (cc: agl@golang.org, golang-dev@googlegroups.com), Please take another look.
11 years, 8 months ago (2012-08-15 21:23:49 UTC) #9
dborowitz
Ok, I give up. How do I get hg+codereview to upload my changes? (Git is ...
11 years, 8 months ago (2012-08-15 21:31:25 UTC) #10
agl1
Assuming that the test passes, the certificate changes LGTM.
11 years, 8 months ago (2012-08-15 22:16:33 UTC) #11
dborowitz
Friendly ping.
11 years, 8 months ago (2012-08-17 01:35:41 UTC) #12
gobot
R=bradfitz (assigned by dsymonds)
11 years, 8 months ago (2012-08-17 04:29:02 UTC) #13
bradfitz
Thanks for doing this. Few little things, then good. http://codereview.appspot.com/6448154/diff/1002/src/pkg/net/http/client_test.go File src/pkg/net/http/client_test.go (right): http://codereview.appspot.com/6448154/diff/1002/src/pkg/net/http/client_test.go#newcode494 src/pkg/net/http/client_test.go:494: ...
11 years, 8 months ago (2012-08-20 04:58:25 UTC) #14
dborowitz
https://codereview.appspot.com/6448154/diff/1002/src/pkg/net/http/client_test.go File src/pkg/net/http/client_test.go (right): https://codereview.appspot.com/6448154/diff/1002/src/pkg/net/http/client_test.go#newcode494 src/pkg/net/http/client_test.go:494: t.Fatalf("expected client to set ServerName 127.0.0.1, got: %q", r.TLS.ServerName) ...
11 years, 8 months ago (2012-08-20 15:05:14 UTC) #15
dborowitz
Ping. On 2012/08/20 15:05:14, dborowitz wrote: > https://codereview.appspot.com/6448154/diff/1002/src/pkg/net/http/client_test.go > File src/pkg/net/http/client_test.go (right): > > https://codereview.appspot.com/6448154/diff/1002/src/pkg/net/http/client_test.go#newcode494 ...
11 years, 8 months ago (2012-08-22 15:45:35 UTC) #16
bradfitz
LGTM I'm back. On Thu, Aug 23, 2012 at 1:45 AM, <dborowitz@google.com> wrote: > Ping. ...
11 years, 8 months ago (2012-08-22 16:13:45 UTC) #17
bradfitz
11 years, 8 months ago (2012-08-22 16:15:49 UTC) #18
*** Submitted as http://code.google.com/p/go/source/detail?r=8d39afcd18b1 ***

net/http: Set TLSClientConfig.ServerName on every HTTP request.

This makes SNI "just work" for callers using the standard http.Client.

Since we now have a test that depends on the httptest.Server cert, change
the cert to be a CA (keeping all other fields the same).

R=bradfitz
CC=agl, dsymonds, gobot, golang-dev
http://codereview.appspot.com/6448154

Committer: Brad Fitzpatrick <bradfitz@golang.org>
Sign in to reply to this message.

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