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:
parent
276003adb1
commit
7b4eed7d66
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user