]> Cypherpunks repositories - gostls13.git/commit
net: avoid using Windows' TransmitFile on non-server machines
authorShibi J M <shibisjm@gmail.com>
Tue, 20 May 2025 03:59:15 +0000 (03:59 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 20 May 2025 18:06:59 +0000 (11:06 -0700)
commitbe0cc937ec9c109da90ec4d7da5af89606f8c0cf
tree7081272ffb6c8b02282455e8072df8514a621749
parent0c7311e9ca8440801b40928878db623f98e3008f
net: avoid using Windows' TransmitFile on non-server machines

Windows API's TransmitFile function is limited to two concurrent
operations on workstation and client versions of Windows. This change
modifies the net.sendFile function to perform no work in such cases
so that TransmitFile is avoided.

Fixes #73746

Change-Id: Iba70d5d2758bf986e80c78254c8e9e10b39bb368
GitHub-Last-Rev: 315ddc0cd8034f52632dc31baf35057a8bad9bcd
GitHub-Pull-Request: golang/go#73758
Reviewed-on: https://go-review.googlesource.com/c/go/+/673855
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
src/internal/syscall/windows/types_windows.go
src/internal/syscall/windows/version_windows.go
src/internal/syscall/windows/zsyscall_windows.go
src/net/sendfile.go
src/net/sendfile_nonwindows.go [new file with mode: 0644]
src/net/sendfile_stub.go
src/net/sendfile_test.go
src/net/sendfile_windows.go [new file with mode: 0644]