]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: Minor fix to error messages in test.
authorMichael McGreevy <mcgreevy@golang.org>
Thu, 7 Jan 2016 02:32:46 +0000 (13:32 +1100)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 7 Jan 2016 05:00:50 +0000 (05:00 +0000)
Change-Id: I995ac0559f89110662d79d136d710ef3a0bb1505
Reviewed-on: https://go-review.googlesource.com/18351
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/http/serve_test.go

index 4a006fb369bf512fc73c5030509f3c0aa0000054..34e2a4d6700808ce7a3bdad008b0225467beae28 100644 (file)
@@ -2685,7 +2685,7 @@ func TestHeaderToWire(t *testing.T) {
                                        return errors.New("header appeared from after WriteHeader")
                                }
                                if !strings.Contains(got, "Content-Type: some/type") {
-                                       return errors.New("wrong content-length")
+                                       return errors.New("wrong content-type")
                                }
                                return nil
                        },
@@ -2698,7 +2698,7 @@ func TestHeaderToWire(t *testing.T) {
                        },
                        check: func(got string) error {
                                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
                        },
@@ -2711,7 +2711,7 @@ func TestHeaderToWire(t *testing.T) {
                        },
                        check: func(got string) error {
                                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
                        },
@@ -2722,7 +2722,7 @@ func TestHeaderToWire(t *testing.T) {
                        },
                        check: func(got string) error {
                                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") {
                                        return errors.New("want 0 content-length")