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

Issue 76540043: code review 76540043: net/http: add BasicAuth method to *http.Request

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 8 months ago by hightower
Modified:
10 years, 2 months ago
Reviewers:
bradfitz
CC:
golang-codereviews, josharian, bradfitz, Hierro, blakesgentry_gmail.com
Visibility:
Public.

Description

net/http: add BasicAuth method to *http.Request The net/http package supports setting the HTTP Authorization header using the Basic Authentication Scheme as defined in RFC 2617, but does not provide support for extracting the username and password from an authenticated request using the Basic Authentication Scheme. Add BasicAuth method to *http.Request that returns the username and password from authenticated requests using the Basic Authentication Scheme. Fixes issue 6779.

Patch Set 1 #

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

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

Total comments: 7

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

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

Total comments: 5

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

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

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

Total comments: 1

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -0 lines) Patch
M src/pkg/net/http/request.go View 1 2 3 4 5 6 7 8 2 chunks +30 lines, -0 lines 0 comments Download
M src/pkg/net/http/request_test.go View 1 2 3 4 5 6 7 8 2 chunks +70 lines, -0 lines 0 comments Download

Messages

Total messages: 29
hightower
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
10 years, 8 months ago (2014-03-16 18:23:32 UTC) #1
josharian
r=bradfitz Not sure whether this is too late for Go 1.3. Took a first pass ...
10 years, 8 months ago (2014-03-16 18:51:15 UTC) #2
hightower
I think we should stick to "username" vs "userid" since that is what is used ...
10 years, 8 months ago (2014-03-16 18:58:22 UTC) #3
hightower
On 2014/03/16 18:51:15, josharian wrote: > r=bradfitz > > Not sure whether this is too ...
10 years, 8 months ago (2014-03-16 19:10:30 UTC) #4
hightower
Hello golang-codereviews@googlegroups.com, josharian@gmail.com, bradfitz@golang.org (cc: golang-codereviews@googlegroups.com), Please take another look.
10 years, 8 months ago (2014-03-16 23:39:30 UTC) #5
Hierro
On 2014/03/16 23:39:30, hightower wrote: > Hello mailto:golang-codereviews@googlegroups.com, mailto:josharian@gmail.com, > mailto:bradfitz@golang.org (cc: mailto:golang-codereviews@googlegroups.com), > > ...
10 years, 8 months ago (2014-03-17 13:20:26 UTC) #6
hightower
On 2014/03/17 13:20:26, Hierro wrote: > On 2014/03/16 23:39:30, hightower wrote: > > Hello mailto:golang-codereviews@googlegroups.com, ...
10 years, 8 months ago (2014-03-17 14:39:16 UTC) #7
Hierro
On 2014/03/17 14:39:16, hightower wrote: > On 2014/03/17 13:20:26, Hierro wrote: > > On 2014/03/16 ...
10 years, 8 months ago (2014-03-17 15:10:20 UTC) #8
Hierro
Sorry, I sent the wrong playground link - this is the correct one http://play.golang.org/p/ZgB95Wn_CM Regards, ...
10 years, 8 months ago (2014-03-17 15:18:07 UTC) #9
hightower
On 2014/03/17 15:10:20, Hierro wrote: > On 2014/03/17 14:39:16, hightower wrote: > > On 2014/03/17 ...
10 years, 8 months ago (2014-03-17 15:45:38 UTC) #10
hightower
On 2014/03/16 18:51:15, josharian wrote: > r=bradfitz > > Not sure whether this is too ...
10 years, 8 months ago (2014-03-17 15:48:34 UTC) #11
Hierro
On 2014/03/17 15:45:38, hightower wrote: > On 2014/03/17 15:10:20, Hierro wrote: > > On 2014/03/17 ...
10 years, 8 months ago (2014-03-17 17:37:10 UTC) #12
bradfitz
The length of this thread (which I haven't read yet), suggests that this is too ...
10 years, 8 months ago (2014-03-17 18:18:02 UTC) #13
hightower
On 2014/03/17 18:18:02, bradfitz wrote: > The length of this thread (which I haven't read ...
10 years, 8 months ago (2014-03-17 18:35:45 UTC) #14
bradfitz
On Mon, Mar 17, 2014 at 11:35 AM, <kelsey.hightower@gmail.com> wrote: > On 2014/03/17 18:18:02, bradfitz ...
10 years, 8 months ago (2014-03-17 18:39:08 UTC) #15
hightower
Totally agree. Thanks Brad. Sent from my iPhone > On Mar 17, 2014, at 11:39 ...
10 years, 8 months ago (2014-03-17 19:10:44 UTC) #16
bradfitz
R=close Please ping this thread again after Go 1.3.
10 years, 7 months ago (2014-04-11 20:55:30 UTC) #17
bgentry
On 2014/04/11 20:55:30, bradfitz wrote: > R=close > > Please ping this thread again after ...
10 years, 3 months ago (2014-08-12 21:52:58 UTC) #18
hightower
On 2014/08/12 21:52:58, bgentry wrote: > On 2014/04/11 20:55:30, bradfitz wrote: > > R=close > ...
10 years, 3 months ago (2014-08-12 21:54:48 UTC) #19
bradfitz
Sorry for the review delay. FYI: the tree closes in 3 days, so you don't ...
10 years, 2 months ago (2014-08-28 15:36:28 UTC) #20
hightower
On 2014/08/28 15:36:28, bradfitz wrote: > Sorry for the review delay. FYI: the tree closes ...
10 years, 2 months ago (2014-08-28 15:38:02 UTC) #21
hightower
Hello golang-codereviews@googlegroups.com, josharian@gmail.com, bradfitz@golang.org, alberto.garcia.hierro@gmail.com, blakesgentry@gmail.com (cc: golang-codereviews@googlegroups.com), Please take another look.
10 years, 2 months ago (2014-08-29 08:56:30 UTC) #22
bgentry
hightower - I think you missed one of Brad's requests from a previous version to ...
10 years, 2 months ago (2014-08-29 20:44:33 UTC) #23
hightower
On 2014/08/29 20:44:33, bgentry wrote: > hightower - I think you missed one of Brad's ...
10 years, 2 months ago (2014-08-29 20:45:07 UTC) #24
bradfitz
You going to fix it? On Fri, Aug 29, 2014 at 1:45 PM, <kelsey.hightower@gmail.com> wrote: ...
10 years, 2 months ago (2014-08-30 01:51:11 UTC) #25
hightower
Hello golang-codereviews@googlegroups.com, josharian@gmail.com, bradfitz@golang.org, alberto.garcia.hierro@gmail.com, blakesgentry@gmail.com (cc: golang-codereviews@googlegroups.com), Please take another look.
10 years, 2 months ago (2014-08-30 03:04:12 UTC) #26
bradfitz
Thanks. On Fri, Aug 29, 2014 at 8:04 PM, <kelsey.hightower@gmail.com> wrote: > Hello golang-codereviews@googlegroups.com, josharian@gmail.com, ...
10 years, 2 months ago (2014-08-30 03:19:55 UTC) #27
bradfitz
LGTM
10 years, 2 months ago (2014-08-30 05:19:22 UTC) #28
bradfitz
10 years, 2 months ago (2014-08-30 05:19:33 UTC) #29
*** Submitted as https://code.google.com/p/go/source/detail?r=5e03333d2dcf ***

net/http: add BasicAuth method to *http.Request

The net/http package supports setting the HTTP Authorization header
using the Basic Authentication Scheme as defined in RFC 2617, but does
not provide support for extracting the username and password from an
authenticated request using the Basic Authentication Scheme.

Add BasicAuth method to *http.Request that returns the username and
password from authenticated requests using the Basic Authentication
Scheme.

Fixes issue 6779.

LGTM=bradfitz
R=golang-codereviews, josharian, bradfitz, alberto.garcia.hierro, blakesgentry
CC=golang-codereviews
https://codereview.appspot.com/76540043

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