http2/h2c: Add missing error check

Before this change, error returned by `io.ReadFull` was silently
ignored

Signed-off-by: Michal Rostecki <mrostecki@suse.de>
Change-Id: I6a4604f0c0172a4b951fa4fc99ee83c6ba2ac8d7
Reviewed-on: https://go-review.googlesource.com/c/153137
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/http2/h2c/h2c.go b/http2/h2c/h2c.go
index 03a31c8..07c5c9a 100644
--- a/http2/h2c/h2c.go
+++ b/http2/h2c/h2c.go
@@ -118,6 +118,9 @@
 
 	buf := make([]byte, len(expectedBody))
 	n, err := io.ReadFull(rw, buf)
+	if err != nil {
+		return nil, fmt.Errorf("could not read from the buffer: %s", err)
+	}
 
 	if string(buf[:n]) == expectedBody {
 		c := &rwConn{