aboutsummaryrefslogtreecommitdiff
path: root/src/net/http/client_test.go
diff options
context:
space:
mode:
authorDamien Neil <dneil@google.com>2026-03-03 08:12:25 -0800
committerGopher Robot <gobot@golang.org>2026-03-12 08:13:20 -0700
commit080aa8e9647e5211650f34f3a93fb493afbe396d (patch)
treeab00dcd761d3622f08ff5aa7e2a52ff8c1fd0591 /src/net/http/client_test.go
parent81908597a8787b09b1da90e7c6d3461b4302820f (diff)
downloadgo-080aa8e9647e5211650f34f3a93fb493afbe396d.tar.xz
net/http: use net/http/internal/http2 rather than h2_bundle.go
Rework net/http/internal/http2 to use internally-defined types rather than net/http types (to avoid an import cycle). Remove h2_bundle.go, and replace it with calls into net/http/internal/http2 instead. For #67810 Change-Id: I56a1b28dbd0e302ab15a30f819dd46256a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/751304 Reviewed-by: Nicholas Husin <nsh@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Damien Neil <dneil@google.com> Reviewed-by: Nicholas Husin <husin@google.com>
Diffstat (limited to 'src/net/http/client_test.go')
-rw-r--r--src/net/http/client_test.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/net/http/client_test.go b/src/net/http/client_test.go
index 9952ed52c6..8c3fe1b5a2 100644
--- a/src/net/http/client_test.go
+++ b/src/net/http/client_test.go
@@ -60,7 +60,9 @@ func pedanticReadAll(r io.Reader) (b []byte, err error) {
}
}
-func TestClient(t *testing.T) { run(t, testClient) }
+func TestClient(t *testing.T) {
+ run(t, testClient, []testMode{http1Mode, https1Mode, http2UnencryptedMode, http2Mode})
+}
func testClient(t *testing.T, mode testMode) {
ts := newClientServerTest(t, mode, robotsTxtHandler).ts
@@ -2286,6 +2288,11 @@ func testProbeZeroLengthBody(t *testing.T, mode testMode) {
defer wg.Done()
req, _ := NewRequest("GET", cst.ts.URL, bodyr)
res, err := cst.c.Do(req)
+ if err != nil {
+ t.Error(err)
+ return
+ }
+ defer res.Body.Close()
b, err := io.ReadAll(res.Body)
if err != nil {
t.Error(err)