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

Issue 4634048: code review 4634048: http: permit handlers to explicitly remove the Date header (Closed)

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

Description

http: permit handlers to explicitly remove the Date header We'll do the right thing by default, but people wanting minimal response sizes can explicitly remove the Date header. (empty fields aren't written out)

Patch Set 1 #

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

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

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

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

Total comments: 4

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

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

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

Messages

Total messages: 19
bradfitz
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg
13 years, 9 months ago (2011-06-16 21:37:10 UTC) #1
rsc
where is it documented that empty fields are not written out?
13 years, 9 months ago (2011-06-16 21:42:46 UTC) #2
bradfitz
Good question. Updated docs. PTAL. On Thu, Jun 16, 2011 at 2:42 PM, Russ Cox ...
13 years, 9 months ago (2011-06-16 21:45:12 UTC) #3
bradfitz
Hello golang-dev@googlegroups.com, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 9 months ago (2011-06-16 21:45:12 UTC) #4
rsc
I don't think this is right. Conflating the empty list with a list containing the ...
13 years, 9 months ago (2011-06-20 19:13:58 UTC) #5
bradfitz
Okay, I changed the serve_test from this: w.Header().Set("Date", "") to: w.Header()["Date"] = []string{} The existing ...
13 years, 9 months ago (2011-06-20 19:33:09 UTC) #6
bradfitz
Hello golang-dev@googlegroups.com, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 9 months ago (2011-06-20 19:33:34 UTC) #7
rsc
I like your new semantics much better. http://codereview.appspot.com/4634048/diff/12001/src/pkg/http/header.go File src/pkg/http/header.go (right): http://codereview.appspot.com/4634048/diff/12001/src/pkg/http/header.go#newcode46 src/pkg/http/header.go:46: // Empty ...
13 years, 9 months ago (2011-06-20 19:36:29 UTC) #8
bradfitz
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 9 months ago (2011-06-20 19:40:54 UTC) #9
rsc
LGTM
13 years, 9 months ago (2011-06-20 19:43:04 UTC) #10
rsc
I can't figure out where the code is that writes the header, but if there ...
13 years, 9 months ago (2011-06-20 19:45:53 UTC) #11
bradfitz
You just commented on the code a minute ago. It's in header.go. On Mon, Jun ...
13 years, 9 months ago (2011-06-20 19:50:28 UTC) #12
rsc
On Mon, Jun 20, 2011 at 15:50, Brad Fitzpatrick <bradfitz@golang.org> wrote: > You just commented ...
13 years, 9 months ago (2011-06-20 19:52:07 UTC) #13
bradfitz
Will do. I see nothing in RFC 2616 prohibiting it. I don't know why they ...
13 years, 9 months ago (2011-06-20 20:05:09 UTC) #14
rsc
On Mon, Jun 20, 2011 at 16:05, Brad Fitzpatrick <bradfitz@golang.org> wrote: > Will do. I ...
13 years, 9 months ago (2011-06-20 20:09:58 UTC) #15
bradfitz
*** Submitted as http://code.google.com/p/go/source/detail?r=7700d209820a *** http: permit handlers to explicitly remove the Date header We'll ...
13 years, 9 months ago (2011-06-20 20:39:14 UTC) #16
bradfitz
*** Abandoned ***
13 years, 9 months ago (2011-06-21 18:20:52 UTC) #17
bradfitz
er, no. wrong -d vs -D again. *sigh* On Tue, Jun 21, 2011 at 11:20 ...
13 years, 9 months ago (2011-06-21 18:28:55 UTC) #18
rsc
13 years, 9 months ago (2011-06-21 18:36:09 UTC) #19
On Tue, Jun 21, 2011 at 14:28, Brad Fitzpatrick <bradfitz@golang.org> wrote:
> er, no.  wrong -d vs -D again.  *sigh*

instead of manual deletion just run hg sync
Sign in to reply to this message.

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