]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: fix spelling issues in comments and tests
authorOleksandr Redko <oleksandr.red+github@gmail.com>
Thu, 18 May 2023 08:12:23 +0000 (11:12 +0300)
committerGopher Robot <gobot@golang.org>
Wed, 24 May 2023 18:48:34 +0000 (18:48 +0000)
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>

src/net/dnsclient_unix_test.go
src/net/http/client_test.go
src/net/http/cookiejar/jar.go
src/net/http/transport_test.go
src/net/mptcpsock_linux.go
src/net/timeout_test.go

index 6deeb39104260ca64cf296da6f7d9b2eef2e5b11..8d435a557f26f0464cae5a8c8ff41f54679f6123 100644 (file)
@@ -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)
        }
 }
 
index b8c914bfd03ce5feea3babeb937346b6a8bfc397..0fe555af38f08a3b06101f11f2edb4a96d9e458d 100644 (file)
@@ -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
index e1ba5971e0a8e1f958fb57d93e1fe58254502008..d5731476500788bfa488e4795123949e1b00b919 100644 (file)
@@ -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
                }
index fdbc5daa8d430d08062d9dec402459327e948dc5..172aba679be23e2d5163e82bda5ce0b0b9cb44b8 100644 (file)
@@ -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
index e1a78fd59f952f7452a6982e01ea9031eb41e9bd..b2ac3ee7182a09c27d8a3e6400f470e6419c4ee8 100644 (file)
@@ -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)
index 89605d92fc7679fdaec192e0c68421635b707af6..c0bce57b949f6025977ab07b4415c8a04314bd86 100644 (file)
@@ -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