mirror of
https://github.com/golang/go
synced 2024-11-23 05:30:07 -07:00
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: Andrew Bonventre <andybons@golang.org>
This commit is contained in:
parent
b294fe9b0a
commit
d10ab13c18
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user