|
http: change ResponseWriter.SetHeader(k,v) to Header() accessor
Caller code needs to change:
rw.SetHeader("Content-Type", "text/plain")
to:
rw.Header().Set("Content-Type", "text/plain")
This now permits returning multiple headers
with the same name using Add:
rw.Header().Add("Set-Cookie", "..")
rw.Header().Add("Set-Cookie", "..")
This patch also fixes serialization of headers, removing newline characters.
Fixes issue 488
Fixes Issue 914
Total comments: 14
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+107 lines, -110 lines) |
Patch |
|
M |
src/cmd/godoc/godoc.go
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/cmd/godoc/main.go
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/pkg/expvar/expvar.go
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/pkg/http/cgi/child.go
|
View
|
1
|
1 chunk |
+2 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/pkg/http/cgi/host.go
|
View
|
1
|
2 chunks |
+2 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/pkg/http/cgi/host_test.go
|
View
|
1
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/pkg/http/cgi/matryoshka_test.go
|
View
|
1
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/pkg/http/fs.go
|
View
|
1
|
3 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
|
M |
src/pkg/http/httptest/recorder.go
|
View
|
1
2
3
4
|
3 chunks |
+9 lines, -16 lines |
0 comments
|
Download
|
|
M |
src/pkg/http/pprof/pprof.go
|
View
|
1
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/pkg/http/response.go
|
View
|
1
2
3
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
|
M |
src/pkg/http/responsewrite_test.go
|
View
|
1
2
3
|
2 chunks |
+24 lines, -1 line |
0 comments
|
Download
|
|
M |
src/pkg/http/serve_test.go
|
View
|
1
|
4 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/pkg/http/server.go
|
View
|
1
2
3
|
16 chunks |
+40 lines, -55 lines |
0 comments
|
Download
|
|
M |
src/pkg/http/triv.go
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/pkg/rpc/server.go
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 6
|