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>
Showing
Please
register
or
sign in
to comment