Commit d10ab13c authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

net/http: expand a TimeoutHandler test a bit

Updates #22821

Change-Id: I2d0d483538174a90f56c26d99bea89fe9ce4d144
Reviewed-on: https://go-review.googlesource.com/125855
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarAndrew Bonventre <andybons@golang.org>
parent b294fe9b
......@@ -2324,6 +2324,9 @@ func testTimeoutHandler(t *testing.T, h2 bool) {
if !strings.Contains(string(body), "<title>Timeout</title>") {
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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment