aboutsummaryrefslogtreecommitdiff
path: root/src/net/http/clientserver_test.go
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2016-11-14 22:11:05 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2016-11-14 22:39:50 +0000
commitbb00a8d97faa70bf7a1cbdd4a43e95347a9c8709 (patch)
tree1018b4fbe3a9ecfc5415c1e8013c3306d5873dbe /src/net/http/clientserver_test.go
parentb83350a2e05d63eaae8da9ff4f957ab44e4cb9d9 (diff)
downloadgo-bb00a8d97faa70bf7a1cbdd4a43e95347a9c8709.tar.xz
net/http: update bundled http2, add TestServerKeepAlivesEnabled h1/h2 tests
Updates x/net/http2 to x/net git rev 6dfeb344 for: http2: make Server respect http1 Server's SetKeepAlivesEnabled https://golang.org/cl/33153 And adds a test in std. Fixes #17717 Change-Id: I3ba000abb6f3f682261e105d8a4bb93bde6609fe Reviewed-on: https://go-review.googlesource.com/33231 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tom Bergan <tombergan@google.com>
Diffstat (limited to 'src/net/http/clientserver_test.go')
-rw-r--r--src/net/http/clientserver_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/net/http/clientserver_test.go b/src/net/http/clientserver_test.go
index 3c4b7773a1..e736e7c7dd 100644
--- a/src/net/http/clientserver_test.go
+++ b/src/net/http/clientserver_test.go
@@ -44,6 +44,19 @@ func (t *clientServerTest) close() {
t.ts.Close()
}
+func (t *clientServerTest) getURL(u string) string {
+ res, err := t.c.Get(u)
+ if err != nil {
+ t.t.Fatal(err)
+ }
+ defer res.Body.Close()
+ slurp, err := ioutil.ReadAll(res.Body)
+ if err != nil {
+ t.t.Fatal(err)
+ }
+ return string(slurp)
+}
+
func (t *clientServerTest) scheme() string {
if t.h2 {
return "https"