mirror of https://github.com/golang/go.git
Fixing tests.
This commit is contained in:
parent
21744b96bd
commit
53df6e73c4
|
|
@ -606,8 +606,9 @@ func testServeFileNotModified(t *testing.T, h2 bool) {
|
||||||
if g, e := resp.StatusCode, StatusNotModified; g != e {
|
if g, e := resp.StatusCode, StatusNotModified; g != e {
|
||||||
t.Errorf("status mismatch: got %d, want %d", g, e)
|
t.Errorf("status mismatch: got %d, want %d", g, e)
|
||||||
}
|
}
|
||||||
if g, e := resp.ContentLength, int64(-1); g != e {
|
// HTTP1 transport sets ContentLength to 0.
|
||||||
t.Errorf("Content-Length mismatch: got %d, want %d", g, e)
|
if g, e1, e2 := resp.ContentLength, int64(-1), int64(0); g != e1 && g != e2 {
|
||||||
|
t.Errorf("Content-Length mismatch: got %d, want %d or %d", g, e1, e2)
|
||||||
}
|
}
|
||||||
if resp.Header.Get("Content-Type") != "" {
|
if resp.Header.Get("Content-Type") != "" {
|
||||||
t.Errorf("Content-Type present, but it should not be")
|
t.Errorf("Content-Type present, but it should not be")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue