aboutsummaryrefslogtreecommitdiff
path: root/src/net/http
diff options
context:
space:
mode:
authorMartin Möhrmann <martisch@uos.de>2016-02-24 11:55:20 +0100
committerBrad Fitzpatrick <bradfitz@golang.org>2016-02-24 18:42:29 +0000
commitfdd0179bb1fdd70d405929b78c7d2fb6b61369b0 (patch)
tree5dadc692c0e8ec767846f9dfc0fee73338d0b5b8 /src/net/http
parent4feb47bc765d2cd7d774b0a28b06e8d81a1affe7 (diff)
downloadgo-fdd0179bb1fdd70d405929b78c7d2fb6b61369b0.tar.xz
all: fix typos and spelling
Change-Id: Icd06d99c42b8299fd931c7da821e1f418684d913 Reviewed-on: https://go-review.googlesource.com/19829 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/net/http')
-rw-r--r--src/net/http/client_test.go2
-rw-r--r--src/net/http/cookie.go2
-rw-r--r--src/net/http/h2_bundle.go14
-rw-r--r--src/net/http/httptest/server_test.go2
-rw-r--r--src/net/http/request.go2
-rw-r--r--src/net/http/request_test.go2
-rw-r--r--src/net/http/requestwrite_test.go2
-rw-r--r--src/net/http/server.go2
-rw-r--r--src/net/http/transport.go2
-rw-r--r--src/net/http/transport_test.go2
10 files changed, 16 insertions, 16 deletions
diff --git a/src/net/http/client_test.go b/src/net/http/client_test.go
index 8939dc8baf..e4fed26803 100644
--- a/src/net/http/client_test.go
+++ b/src/net/http/client_test.go
@@ -273,7 +273,7 @@ func TestClientRedirects(t *testing.T) {
t.Fatal("didn't see redirect")
}
if lastReq.Cancel != cancel {
- t.Errorf("expected lastReq to have the cancel channel set on the inital req")
+ t.Errorf("expected lastReq to have the cancel channel set on the initial req")
}
checkErr = errors.New("no redirects allowed")
diff --git a/src/net/http/cookie.go b/src/net/http/cookie.go
index 648709dd99..1ea0e9397a 100644
--- a/src/net/http/cookie.go
+++ b/src/net/http/cookie.go
@@ -223,7 +223,7 @@ func readCookies(h Header, filter string) []*Cookie {
return cookies
}
-// validCookieDomain returns wheter v is a valid cookie domain-value.
+// validCookieDomain returns whether v is a valid cookie domain-value.
func validCookieDomain(v string) bool {
if isCookieDomainName(v) {
return true
diff --git a/src/net/http/h2_bundle.go b/src/net/http/h2_bundle.go
index 4e19b3e71f..f778acb2b5 100644
--- a/src/net/http/h2_bundle.go
+++ b/src/net/http/h2_bundle.go
@@ -288,7 +288,7 @@ func http2configureTransport(t1 *Transport) (*http2Transport, error) {
}
// registerHTTPSProtocol calls Transport.RegisterProtocol but
-// convering panics into errors.
+// converting panics into errors.
func http2registerHTTPSProtocol(t *Transport, rt RoundTripper) (err error) {
defer func() {
if e := recover(); e != nil {
@@ -1410,7 +1410,7 @@ type http2PriorityFrame struct {
http2PriorityParam
}
-// PriorityParam are the stream prioritzation parameters.
+// PriorityParam are the stream prioritization parameters.
type http2PriorityParam struct {
// StreamDep is a 31-bit stream identifier for the
// stream that this stream depends on. Zero means no
@@ -2850,7 +2850,7 @@ type http2stream struct {
weight uint8
state http2streamState
sentReset bool // only true once detached from streams map
- gotReset bool // only true once detacted from streams map
+ gotReset bool // only true once detached from streams map
gotTrailerHeader bool // HEADER frame for trailers was seen
trailer Header // accumulated trailers
@@ -4391,7 +4391,7 @@ const http2TrailerPrefix = "Trailer:"
// trailers. That worked for a while, until we found the first major
// user of Trailers in the wild: gRPC (using them only over http2),
// and gRPC libraries permit setting trailers mid-stream without
-// predeclarnig them. So: change of plans. We still permit the old
+// predeclaring them. So: change of plans. We still permit the old
// way, but we also permit this hack: if a Header() key begins with
// "Trailer:", the suffix of that key is a Trailer. Because ':' is an
// invalid token byte anyway, there is no ambiguity. (And it's already
@@ -4605,7 +4605,7 @@ type http2Transport struct {
// send in the initial settings frame. It is how many bytes
// of response headers are allow. Unlike the http2 spec, zero here
// means to use a default limit (currently 10MB). If you actually
- // want to advertise an ulimited value to the peer, Transport
+ // want to advertise an unlimited value to the peer, Transport
// interprets the highest possible value here (0xffffffff or 1<<32-1)
// to mean no limit.
MaxHeaderListSize uint32
@@ -5012,7 +5012,7 @@ const http2maxAllocFrameSize = 512 << 10
// frameBuffer returns a scratch buffer suitable for writing DATA frames.
// They're capped at the min of the peer's max frame size or 512KB
// (kinda arbitrarily), but definitely capped so we don't allocate 4GB
-// bufers.
+// buffers.
func (cc *http2ClientConn) frameScratchBuffer() []byte {
cc.mu.Lock()
size := cc.maxFrameSize
@@ -6544,7 +6544,7 @@ func (ws *http2writeScheduler) take() (wm http2frameWriteMsg, ok bool) {
return ws.takeFrom(q.streamID(), q)
}
-// zeroCanSend is defered from take.
+// zeroCanSend is deferred from take.
func (ws *http2writeScheduler) zeroCanSend() {
for i := range ws.canSend {
ws.canSend[i] = nil
diff --git a/src/net/http/httptest/server_test.go b/src/net/http/httptest/server_test.go
index c9606f2419..61470c3822 100644
--- a/src/net/http/httptest/server_test.go
+++ b/src/net/http/httptest/server_test.go
@@ -53,7 +53,7 @@ func TestGetAfterClose(t *testing.T) {
res, err = http.Get(ts.URL)
if err == nil {
body, _ := ioutil.ReadAll(res.Body)
- t.Fatalf("Unexected response after close: %v, %v, %s", res.Status, res.Header, body)
+ t.Fatalf("Unexpected response after close: %v, %v, %s", res.Status, res.Header, body)
}
}
diff --git a/src/net/http/request.go b/src/net/http/request.go
index 8cdab02af5..c3e43bb99d 100644
--- a/src/net/http/request.go
+++ b/src/net/http/request.go
@@ -521,7 +521,7 @@ func cleanHost(in string) string {
return in
}
-// removeZone removes IPv6 zone identifer from host.
+// removeZone removes IPv6 zone identifier from host.
// E.g., "[fe80::1%en0]:8080" to "[fe80::1]:8080"
func removeZone(host string) string {
if !strings.HasPrefix(host, "[") {
diff --git a/src/net/http/request_test.go b/src/net/http/request_test.go
index 0ecdf85a56..3d215ff538 100644
--- a/src/net/http/request_test.go
+++ b/src/net/http/request_test.go
@@ -99,7 +99,7 @@ type parseContentTypeTest struct {
var parseContentTypeTests = []parseContentTypeTest{
{false, stringMap{"Content-Type": {"text/plain"}}},
- // Empty content type is legal - shoult be treated as
+ // Empty content type is legal - should be treated as
// application/octet-stream (RFC 2616, section 7.2.1)
{false, stringMap{}},
{true, stringMap{"Content-Type": {"text/plain; boundary="}}},
diff --git a/src/net/http/requestwrite_test.go b/src/net/http/requestwrite_test.go
index cfb95b0a80..9b70fcbf8a 100644
--- a/src/net/http/requestwrite_test.go
+++ b/src/net/http/requestwrite_test.go
@@ -573,7 +573,7 @@ func TestRequestWriteClosesBody(t *testing.T) {
"Transfer-Encoding: chunked\r\n\r\n" +
// TODO: currently we don't buffer before chunking, so we get a
// single "m" chunk before the other chunks, as this was the 1-byte
- // read from our MultiReader where we stiched the Body back together
+ // read from our MultiReader where we stitched the Body back together
// after sniffing whether the Body was 0 bytes or not.
chunk("m") +
chunk("y body") +
diff --git a/src/net/http/server.go b/src/net/http/server.go
index e2d8d277e0..773dd59c6b 100644
--- a/src/net/http/server.go
+++ b/src/net/http/server.go
@@ -1374,7 +1374,7 @@ func (c *conn) setState(nc net.Conn, state ConnState) {
// badRequestError is a literal string (used by in the server in HTML,
// unescaped) to tell the user why their request was bad. It should
-// be plain text without user info or other embeddded errors.
+// be plain text without user info or other embedded errors.
type badRequestError string
func (e badRequestError) Error() string { return "Bad Request: " + string(e) }
diff --git a/src/net/http/transport.go b/src/net/http/transport.go
index 03e9162b14..f622f6f983 100644
--- a/src/net/http/transport.go
+++ b/src/net/http/transport.go
@@ -982,7 +982,7 @@ func (k connectMethodKey) String() string {
// (but may be used for non-keep-alive requests as well)
type persistConn struct {
// alt optionally specifies the TLS NextProto RoundTripper.
- // This is used for HTTP/2 today and future protocol laters.
+ // This is used for HTTP/2 today and future protocols later.
// If it's non-nil, the rest of the fields are unused.
alt RoundTripper
diff --git a/src/net/http/transport_test.go b/src/net/http/transport_test.go
index d9da078fa0..e8a4623556 100644
--- a/src/net/http/transport_test.go
+++ b/src/net/http/transport_test.go
@@ -853,7 +853,7 @@ func TestTransportExpect100Continue(t *testing.T) {
{path: "/100", body: []byte("hello"), sent: 5, status: 200}, // Got 100 followed by 200, entire body is sent.
{path: "/200", body: []byte("hello"), sent: 0, status: 200}, // Got 200 without 100. body isn't sent.
{path: "/500", body: []byte("hello"), sent: 0, status: 500}, // Got 500 without 100. body isn't sent.
- {path: "/keepalive", body: []byte("hello"), sent: 0, status: 500}, // Althogh without Connection:close, body isn't sent.
+ {path: "/keepalive", body: []byte("hello"), sent: 0, status: 500}, // Although without Connection:close, body isn't sent.
{path: "/timeout", body: []byte("hello"), sent: 5, status: 200}, // Timeout exceeded and entire body is sent.
}