diff --git a/src/net/http/serve_test.go b/src/net/http/serve_test.go index 13057452b4..b53c2f856b 100644 --- a/src/net/http/serve_test.go +++ b/src/net/http/serve_test.go @@ -2324,6 +2324,9 @@ func testTimeoutHandler(t *testing.T, h2 bool) { if !strings.Contains(string(body), "Timeout") { t.Errorf("expected timeout body; got %q", string(body)) } + if g, w := res.Header.Get("Content-Type"), "text/html; charset=utf-8"; g != w { + t.Errorf("response content-type = %q; want %q", g, w) + } // Now make the previously-timed out handler speak again, // which verifies the panic is handled: