Skip to content

Commit 498a814

Browse files
authored
test: fix typos in function, error message, comment (#1512)
1 parent 4ca6994 commit 498a814

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

header_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ func TestRequestHeaderDel(t *testing.T) {
606606

607607
cv := h.Cookie("foobar")
608608
if len(cv) > 0 {
609-
t.Fatalf("unexpected cookie obtianed: %q", cv)
609+
t.Fatalf("unexpected cookie obtained: %q", cv)
610610
}
611611
if h.ContentLength() != 0 {
612612
t.Fatalf("unexpected content-length: %d. Expecting 0", h.ContentLength())
@@ -673,7 +673,7 @@ func TestResponseHeaderDel(t *testing.T) {
673673
}
674674

675675
if h.Cookie(&c) {
676-
t.Fatalf("unexpected cookie obtianed: %q", &c)
676+
t.Fatalf("unexpected cookie obtained: %q", &c)
677677
}
678678
if h.ContentLength() != 0 {
679679
t.Fatalf("unexpected content-length: %d. Expecting 0", h.ContentLength())

server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2225,7 +2225,7 @@ func (s *Server) serveConn(c net.Conn) (err error) {
22252225

22262226
// Reading Headers.
22272227
//
2228-
// If we have pipline response in the outgoing buffer,
2228+
// If we have pipeline response in the outgoing buffer,
22292229
// we only want to try and read the next headers once.
22302230
// If we have to wait for the next request we flush the
22312231
// outgoing buffer first so it doesn't have to wait.

server_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ func TestServerName(t *testing.T) {
384384
},
385385
}
386386

387-
getReponse := func() []byte {
387+
getResponse := func() []byte {
388388
rw := &readWriter{}
389389
rw.r.WriteString("GET / HTTP/1.1\r\nHost: google.com\r\n\r\n")
390390

@@ -400,7 +400,7 @@ func TestServerName(t *testing.T) {
400400
return resp
401401
}
402402

403-
resp := getReponse()
403+
resp := getResponse()
404404
if !bytes.Contains(resp, []byte("\r\nServer: "+defaultServerName+"\r\n")) {
405405
t.Fatalf("Unexpected response %q expected Server: "+defaultServerName, resp)
406406
}
@@ -412,7 +412,7 @@ func TestServerName(t *testing.T) {
412412
Name: "foobar",
413413
}
414414

415-
resp = getReponse()
415+
resp = getResponse()
416416
if !bytes.Contains(resp, []byte("\r\nServer: foobar\r\n")) {
417417
t.Fatalf("Unexpected response %q expected Server: foobar", resp)
418418
}
@@ -425,7 +425,7 @@ func TestServerName(t *testing.T) {
425425
NoDefaultDate: true,
426426
}
427427

428-
resp = getReponse()
428+
resp = getResponse()
429429
if bytes.Contains(resp, []byte("\r\nServer: ")) {
430430
t.Fatalf("Unexpected response %q expected no Server header", resp)
431431
}

0 commit comments

Comments
 (0)