]> Cypherpunks repositories - gostls13.git/commit
net/http: don't set Content-Type with empty body automatically
authorTw <tw19881113@gmail.com>
Sat, 24 Jun 2017 06:23:17 +0000 (14:23 +0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 15 Nov 2017 02:22:21 +0000 (02:22 +0000)
commit8cdd999bf54f5fae0acbf4a6d5a3911e4692ca28
treeef8c4e486e1ee60d8b9b360085c64f0e5bbd6530
parentbd926e1c65557870d152c42265af7533981fae8a
net/http: don't set Content-Type with empty body automatically

We set Content-Type to "text/plain; charset=utf-8" even with blank body
before. Let's strip this unnecessary header though it's harmless in most
cases.

Fixes #20784

Signed-off-by: Tw <tw19881113@gmail.com>
Change-Id: Ic58a410dcbc89f457c6ddd92961d9cbf545b2f4f
Reviewed-on: https://go-review.googlesource.com/46631
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/http/fs_test.go
src/net/http/h2_bundle.go
src/net/http/serve_test.go
src/net/http/server.go
src/net/http/sniff_test.go