aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Redko <oleksandr.red+github@gmail.com>2023-05-18 11:12:23 +0300
committerGopher Robot <gobot@golang.org>2023-05-24 18:48:34 +0000
commit5de20f0f34a7bf08bec8af82befc24e3c0ea5d7e (patch)
tree3e70ba0e2ad1db3c49867ab66b8ec529a725f6b4
parent72bf8acee9a9bd913911d094fc636d2f0f3c446d (diff)
downloadgo-5de20f0f34a7bf08bec8af82befc24e3c0ea5d7e.tar.xz
net/http: fix spelling issues in comments and tests
Change-Id: I1b90619fd073a0c41188278a50ed149b763f0fa8 Reviewed-on: https://go-review.googlesource.com/c/go/+/496135 Run-TryBot: Bryan Mills <bcmills@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
-rw-r--r--src/net/dnsclient_unix_test.go2
-rw-r--r--src/net/http/client_test.go2
-rw-r--r--src/net/http/cookiejar/jar.go2
-rw-r--r--src/net/http/transport_test.go10
-rw-r--r--src/net/mptcpsock_linux.go2
-rw-r--r--src/net/timeout_test.go2
6 files changed, 10 insertions, 10 deletions
diff --git a/src/net/dnsclient_unix_test.go b/src/net/dnsclient_unix_test.go
index 6deeb39104..8d435a557f 100644
--- a/src/net/dnsclient_unix_test.go
+++ b/src/net/dnsclient_unix_test.go
@@ -1605,7 +1605,7 @@ func TestDNSDialTCP(t *testing.T) {
ctx := context.Background()
_, _, err := r.exchange(ctx, "0.0.0.0", mustQuestion("com.", dnsmessage.TypeALL, dnsmessage.ClassINET), time.Second, useUDPOrTCP, false)
if err != nil {
- t.Fatal("exhange failed:", err)
+ t.Fatal("exchange failed:", err)
}
}
diff --git a/src/net/http/client_test.go b/src/net/http/client_test.go
index b8c914bfd0..0fe555af38 100644
--- a/src/net/http/client_test.go
+++ b/src/net/http/client_test.go
@@ -1207,7 +1207,7 @@ func testClientTimeout(t *testing.T, mode testMode) {
}))
// Try to trigger a timeout after reading part of the response body.
- // The initial timeout is emprically usually long enough on a decently fast
+ // The initial timeout is empirically usually long enough on a decently fast
// machine, but if we undershoot we'll retry with exponentially longer
// timeouts until the test either passes or times out completely.
// This keeps the test reasonably fast in the typical case but allows it to
diff --git a/src/net/http/cookiejar/jar.go b/src/net/http/cookiejar/jar.go
index e1ba5971e0..d573147650 100644
--- a/src/net/http/cookiejar/jar.go
+++ b/src/net/http/cookiejar/jar.go
@@ -472,7 +472,7 @@ func (j *Jar) domainAndType(host, domain string) (string, bool, error) {
// would be sent to every subdomain of bbc.co.uk.
// It just doesn't make sense on IP addresses.
// The other processing and validation steps in RFC 6265 just
- // collaps to:
+ // collapse to:
if host != domain {
return "", false, errIllegalDomain
}
diff --git a/src/net/http/transport_test.go b/src/net/http/transport_test.go
index fdbc5daa8d..172aba679b 100644
--- a/src/net/http/transport_test.go
+++ b/src/net/http/transport_test.go
@@ -251,7 +251,7 @@ func testTransportConnectionCloseOnResponse(t *testing.T, mode testMode) {
// an underlying TCP connection after making an http.Request with Request.Close set.
//
// It tests the behavior by making an HTTP request to a server which
-// describes the source source connection it got (remote port number +
+// describes the source connection it got (remote port number +
// address of its net.Conn).
func TestTransportConnectionCloseOnRequest(t *testing.T) {
run(t, testTransportConnectionCloseOnRequest, []testMode{http1Mode})
@@ -2368,7 +2368,7 @@ func testTransportResponseHeaderTimeout(t *testing.T, mode testMode) {
if !tt.wantTimeout {
if !retry {
// The timeout may be set too short. Retry with a longer one.
- t.Logf("unexpected timout for path %q after %v; retrying with longer timeout", tt.path, timeout)
+ t.Logf("unexpected timeout for path %q after %v; retrying with longer timeout", tt.path, timeout)
timeout *= 2
retry = true
}
@@ -5648,7 +5648,7 @@ func testClientTimeoutKillsConn_BeforeHeaders(t *testing.T, mode testMode) {
_, err := cst.c.Get(cst.ts.URL)
if err == nil {
close(cancelHandler)
- t.Fatal("unexpected Get succeess")
+ t.Fatal("unexpected Get success")
}
tooSlow := time.NewTimer(timeout * 10)
@@ -5656,8 +5656,8 @@ func testClientTimeoutKillsConn_BeforeHeaders(t *testing.T, mode testMode) {
case <-tooSlow.C:
// If we didn't get into the Handler, that probably means the builder was
// just slow and the Get failed in that time but never made it to the
- // server. That's fine; we'll try again with a longer timout.
- t.Logf("no handler seen in %v; retrying with longer timout", timeout)
+ // server. That's fine; we'll try again with a longer timeout.
+ t.Logf("no handler seen in %v; retrying with longer timeout", timeout)
close(cancelHandler)
cst.close()
timeout *= 2
diff --git a/src/net/mptcpsock_linux.go b/src/net/mptcpsock_linux.go
index e1a78fd59f..b2ac3ee718 100644
--- a/src/net/mptcpsock_linux.go
+++ b/src/net/mptcpsock_linux.go
@@ -31,7 +31,7 @@ func supportsMultipathTCP() bool {
return mptcpAvailable
}
-// Check that MPTCP is supported by attemting to create an MPTCP socket and by
+// Check that MPTCP is supported by attempting to create an MPTCP socket and by
// looking at the returned error if any.
func initMPTCPavailable() {
s, err := sysSocket(syscall.AF_INET, syscall.SOCK_STREAM, _IPPROTO_MPTCP)
diff --git a/src/net/timeout_test.go b/src/net/timeout_test.go
index 89605d92fc..c0bce57b94 100644
--- a/src/net/timeout_test.go
+++ b/src/net/timeout_test.go
@@ -635,7 +635,7 @@ const (
minDynamicTimeout = 1 * time.Millisecond
// maxDynamicTimeout is the maximum timeout to attempt for
- // tests that automatically increase timeouts until succeess.
+ // tests that automatically increase timeouts until success.
//
// This should be a strict upper bound on the latency required to hit a
// timeout accurately, even on a slow or heavily-loaded machine. If a test