1
0
mirror of https://github.com/golang/go synced 2024-11-18 23:24:39 -07:00

http server: don't send trailing '0' for chunked encoding when responding with 304 NotModified

R=rsc, adg
CC=golang-dev
https://golang.org/cl/2723041
This commit is contained in:
Michael Hoisie 2010-11-01 16:15:03 -04:00 committed by Russ Cox
parent 276003adb1
commit 7b4eed7d66

View File

@ -225,6 +225,7 @@ func (w *response) WriteHeader(code int) {
// Must not have body.
w.header["Content-Type"] = "", false
w.header["Transfer-Encoding"] = "", false
w.chunking = false
}
if !w.req.ProtoAtLeast(1, 0) {
return