]> Cypherpunks repositories - gostls13.git/commit
bufio: don't do empty Write at start of WriteTo
authorIan Lance Taylor <iant@golang.org>
Mon, 27 Jan 2025 05:52:58 +0000 (21:52 -0800)
committerGopher Robot <gobot@golang.org>
Fri, 7 Feb 2025 01:08:54 +0000 (17:08 -0800)
commit290ec2d92bca6472fdabce51fc331b3bcaa7129d
tree521de9734127e3ce5cae85a6931562054132a8eb
parent7c6b047ea14dcc6aa948f901956511c4e8691abf
bufio: don't do empty Write at start of WriteTo

The empty Write will cause the wrong thing to happen when using
io.Copy to copy to a package-based stream.

Fixes #71424

Change-Id: I046a27539447182692ac76a8bdd422327345dd8d
Reviewed-on: https://go-review.googlesource.com/c/go/+/644535
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
Reviewed-by: Damien Neil <dneil@google.com>
src/bufio/bufio.go
src/bufio/bufio_test.go
src/bufio/net_test.go [new file with mode: 0644]