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

Issue 5633045: code review 5633045: net/http: Don't set Content-Type header for HEAD reques... (Closed)

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

Description

net/http: Don't set Content-Type header for HEAD requests by default since the real type is not inferred. Fixes issue 2885.

Patch Set 1 #

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

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

Total comments: 2

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

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

Total comments: 2

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

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

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

Messages

Total messages: 15
pmylund
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 3 months ago (2012-02-06 04:41:21 UTC) #1
dsymonds
add a test please http://codereview.appspot.com/5633045/diff/3001/src/pkg/net/http/server.go File src/pkg/net/http/server.go (right): http://codereview.appspot.com/5633045/diff/3001/src/pkg/net/http/server.go#newcode331 src/pkg/net/http/server.go:331: if code == StatusNotModified { ...
12 years, 3 months ago (2012-02-06 04:55:55 UTC) #2
dsymonds
http://codereview.appspot.com/5633045/diff/3001/src/pkg/net/http/server.go File src/pkg/net/http/server.go (right): http://codereview.appspot.com/5633045/diff/3001/src/pkg/net/http/server.go#newcode344 src/pkg/net/http/server.go:344: if w.header.Get("Content-Type") == "" && w.req.Method != "HEAD" { ...
12 years, 3 months ago (2012-02-06 04:59:43 UTC) #3
pmylund
Hello golang-dev@googlegroups.com, dsymonds@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 3 months ago (2012-02-06 05:11:18 UTC) #4
pmylund
Hello golang-dev@googlegroups.com, dsymonds@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 3 months ago (2012-02-06 05:12:47 UTC) #5
dsymonds
LGTM but leaving for Brad/Russ to sanity check and submit. http://codereview.appspot.com/5633045/diff/4002/src/pkg/net/http/serve_test.go File src/pkg/net/http/serve_test.go (right): http://codereview.appspot.com/5633045/diff/4002/src/pkg/net/http/serve_test.go#newcode509 ...
12 years, 3 months ago (2012-02-06 05:16:22 UTC) #6
dsymonds
Also, please fill out the CLA. http://golang.org/doc/contribute.html#copyright
12 years, 3 months ago (2012-02-06 05:17:32 UTC) #7
pmylund
Hello golang-dev@googlegroups.com, dsymonds@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 3 months ago (2012-02-06 05:18:06 UTC) #8
pmylund
On 2012/02/06 05:18:06, pmylund wrote: > Hello mailto:golang-dev@googlegroups.com, mailto:dsymonds@golang.org (cc: > mailto:golang-dev@googlegroups.com), > > Please ...
12 years, 3 months ago (2012-02-06 05:19:11 UTC) #9
pmylund
Hello golang-dev@googlegroups.com, dsymonds@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 3 months ago (2012-02-06 05:22:49 UTC) #10
bradfitz
On Sun, Feb 5, 2012 at 9:16 PM, <dsymonds@golang.org> wrote: > LGTM > > but ...
12 years, 3 months ago (2012-02-06 05:48:27 UTC) #11
dsymonds
On Mon, Feb 6, 2012 at 4:48 PM, Brad Fitzpatrick <bradfitz@golang.org> wrote: > In that ...
12 years, 3 months ago (2012-02-06 05:49:35 UTC) #12
bradfitz
On Sun, Feb 5, 2012 at 9:49 PM, David Symonds <dsymonds@golang.org> wrote: > On Mon, ...
12 years, 3 months ago (2012-02-06 05:55:19 UTC) #13
pmylund
On 2012/02/06 05:55:19, bradfitz wrote: > On Sun, Feb 5, 2012 at 9:49 PM, David ...
12 years, 3 months ago (2012-02-06 06:02:06 UTC) #14
dsymonds
12 years, 3 months ago (2012-02-06 06:55:53 UTC) #15
*** Submitted as http://code.google.com/p/go/source/detail?r=7c35ab6ef473 ***

net/http: Don't set Content-Type header for HEAD requests by default
since the real type is not inferred.
Fixes issue 2885.

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

Committer: David Symonds <dsymonds@golang.org>
Sign in to reply to this message.

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