diff options
author | Wei Fu <fuweid89@gmail.com> | 2021-01-24 18:21:06 +0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-02-26 15:40:37 +0000 |
commit | 30357d6ef6513b18fade686a629ab8d49987260f (patch) | |
tree | 67b1214a76cf051d6ad2ee68c32b191bedfda267 /src/cmd/compile/internal/ssa/gen/ARM.rules | |
parent | 023c46676db26e75d244b1d38ccc4a4b8bfe3eef (diff) | |
download | go-30357d6ef6513b18fade686a629ab8d49987260f.tar.gz go-30357d6ef6513b18fade686a629ab8d49987260f.zip |
[release-branch.go1.15] internal/poll: netpollcheckerr before sendfile
In net/http package, the ServeContent/ServeFile doesn't check the I/O
timeout error from chunkWriter or *net.TCPConn, which means that both
HTTP status and headers might be missing when WriteTimeout happens. If
the poll.SendFile() doesn't check the *poll.FD state before sending
data, the client will only receive the response body with status and
report "malformed http response/status code".
This patch is to enable netpollcheckerr before sendfile, which should
align with normal *poll.FD.Write() and Splice().
For #43822
Fixes #44294
Change-Id: I32517e3f261bab883a58b577b813ef189214b954
Reviewed-on: https://go-review.googlesource.com/c/go/+/285914
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Trust: Emmanuel Odeke <emmanuel@orijtech.com>
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Emmanuel Odeke <emmanuel@orijtech.com>
(cherry picked from commit f0d23c9dbb2142b975fa8fb13a57213d0c15bdd1)
Reviewed-on: https://go-review.googlesource.com/c/go/+/296530
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/gen/ARM.rules')
0 files changed, 0 insertions, 0 deletions