aboutsummaryrefslogtreecommitdiff
path: root/src/net/http/readrequest_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/http/readrequest_test.go')
-rw-r--r--src/net/http/readrequest_test.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/net/http/readrequest_test.go b/src/net/http/readrequest_test.go
index 1225d97edb..4bf646b0a6 100644
--- a/src/net/http/readrequest_test.go
+++ b/src/net/http/readrequest_test.go
@@ -380,6 +380,27 @@ var reqTests = []reqTest{
noTrailer,
noError,
},
+
+ // http2 client preface:
+ {
+ "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n",
+ &Request{
+ Method: "PRI",
+ URL: &url.URL{
+ Path: "*",
+ },
+ Header: Header{},
+ Proto: "HTTP/2.0",
+ ProtoMajor: 2,
+ ProtoMinor: 0,
+ RequestURI: "*",
+ ContentLength: -1,
+ Close: true,
+ },
+ noBody,
+ noTrailer,
+ noError,
+ },
}
func TestReadRequest(t *testing.T) {