aboutsummaryrefslogtreecommitdiff
path: root/src/net/http/transfer.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/http/transfer.go')
-rw-r--r--src/net/http/transfer.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/net/http/transfer.go b/src/net/http/transfer.go
index fd9389adf0..c39d6cff67 100644
--- a/src/net/http/transfer.go
+++ b/src/net/http/transfer.go
@@ -638,8 +638,7 @@ func (b *body) readTrailer() error {
// The common case, since nobody uses trailers.
buf, err := b.r.Peek(2)
if bytes.Equal(buf, singleCRLF) {
- b.r.ReadByte()
- b.r.ReadByte()
+ b.r.Discard(2)
return nil
}
if len(buf) < 2 {