diff options
Diffstat (limited to 'libgo/go/net/http/readrequest_test.go')
-rw-r--r-- | libgo/go/net/http/readrequest_test.go | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/libgo/go/net/http/readrequest_test.go b/libgo/go/net/http/readrequest_test.go index 60e2be4..4bf646b 100644 --- a/libgo/go/net/http/readrequest_test.go +++ b/libgo/go/net/http/readrequest_test.go @@ -1,4 +1,4 @@ -// Copyright 2010 The Go Authors. All rights reserved. +// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -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) { |