Commit 002e658a authored by Michael McGreevy's avatar Michael McGreevy Committed by Brad Fitzpatrick

net/http: Minor fix to error messages in test.

Change-Id: I995ac0559f89110662d79d136d710ef3a0bb1505
Reviewed-on: https://go-review.googlesource.com/18351Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent f962fc08
...@@ -2685,7 +2685,7 @@ func TestHeaderToWire(t *testing.T) { ...@@ -2685,7 +2685,7 @@ func TestHeaderToWire(t *testing.T) {
return errors.New("header appeared from after WriteHeader") return errors.New("header appeared from after WriteHeader")
} }
if !strings.Contains(got, "Content-Type: some/type") { if !strings.Contains(got, "Content-Type: some/type") {
return errors.New("wrong content-length") return errors.New("wrong content-type")
} }
return nil return nil
}, },
...@@ -2698,7 +2698,7 @@ func TestHeaderToWire(t *testing.T) { ...@@ -2698,7 +2698,7 @@ func TestHeaderToWire(t *testing.T) {
}, },
check: func(got string) error { check: func(got string) error {
if !strings.Contains(got, "Content-Type: text/html") { if !strings.Contains(got, "Content-Type: text/html") {
return errors.New("wrong content-length; want html") return errors.New("wrong content-type; want html")
} }
return nil return nil
}, },
...@@ -2711,7 +2711,7 @@ func TestHeaderToWire(t *testing.T) { ...@@ -2711,7 +2711,7 @@ func TestHeaderToWire(t *testing.T) {
}, },
check: func(got string) error { check: func(got string) error {
if !strings.Contains(got, "Content-Type: some/type") { if !strings.Contains(got, "Content-Type: some/type") {
return errors.New("wrong content-length; want html") return errors.New("wrong content-type; want html")
} }
return nil return nil
}, },
...@@ -2722,7 +2722,7 @@ func TestHeaderToWire(t *testing.T) { ...@@ -2722,7 +2722,7 @@ func TestHeaderToWire(t *testing.T) {
}, },
check: func(got string) error { check: func(got string) error {
if !strings.Contains(got, "Content-Type: text/plain") { if !strings.Contains(got, "Content-Type: text/plain") {
return errors.New("wrong content-length; want text/plain") return errors.New("wrong content-type; want text/plain")
} }
if !strings.Contains(got, "Content-Length: 0") { if !strings.Contains(got, "Content-Length: 0") {
return errors.New("want 0 content-length") return errors.New("want 0 content-length")
......
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