aboutsummaryrefslogtreecommitdiff
path: root/src/net/http/transfer.go
diff options
context:
space:
mode:
authorcui fliter <imcusg@gmail.com>2022-11-11 19:22:35 +0800
committerGopher Robot <gobot@golang.org>2022-11-18 17:59:44 +0000
commitb2faff18ce28edad98303d2c3134dec1331fd7b5 (patch)
tree2161dfe37742a6be201f506abf0d4f20533e8d76 /src/net/http/transfer.go
parent893964b9727a3dfcadab75c0f6b3c6b683b9bae0 (diff)
downloadgo-b2faff18ce28edad98303d2c3134dec1331fd7b5.tar.xz
all: add missing periods in comments
Change-Id: I69065f8adf101fdb28682c55997f503013a50e29 Reviewed-on: https://go-review.googlesource.com/c/go/+/449757 Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Joedian Reid <joedian@golang.org> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Joedian Reid <joedian@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/net/http/transfer.go')
-rw-r--r--src/net/http/transfer.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/net/http/transfer.go b/src/net/http/transfer.go
index 09b42c188a..7c7afd7de4 100644
--- a/src/net/http/transfer.go
+++ b/src/net/http/transfer.go
@@ -600,7 +600,7 @@ func readTransfer(msg any, r *bufio.Reader) (err error) {
return nil
}
-// Checks whether chunked is part of the encodings stack
+// Checks whether chunked is part of the encodings stack.
func chunked(te []string) bool { return len(te) > 0 && te[0] == "chunked" }
// Checks whether the encoding is explicitly "identity".
@@ -738,7 +738,7 @@ func fixLength(isResponse bool, status int, requestMethod string, header Header,
// Determine whether to hang up after sending a request and body, or
// receiving a response and body
-// 'header' is the request headers
+// 'header' is the request headers.
func shouldClose(major, minor int, header Header, removeCloseHeader bool) bool {
if major < 1 {
return true
@@ -757,7 +757,7 @@ func shouldClose(major, minor int, header Header, removeCloseHeader bool) bool {
return hasClose
}
-// Parse the trailer header
+// Parse the trailer header.
func fixTrailer(header Header, chunked bool) (Header, error) {
vv, ok := header["Trailer"]
if !ok {
@@ -1081,7 +1081,7 @@ var nopCloserWriterToType = reflect.TypeOf(io.NopCloser(struct {
}{}))
// unwrapNopCloser return the underlying reader and true if r is a NopCloser
-// else it return false
+// else it return false.
func unwrapNopCloser(r io.Reader) (underlyingReader io.Reader, isNopCloser bool) {
switch reflect.TypeOf(r) {
case nopCloserType, nopCloserWriterToType: