splice isn't used when serving files #60
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
馃挕 The feature or bug you are proposing
splice isn't used when serving static files.
馃搫 The description of the bug or the logic behind your proposal
I have a special use case where I need to serve files from a local http server. Golang has a special behavior when the destination writer is a https://pkg.go.dev/net#TCPConn.ReadFrom and your source is a "splice-able" reader, like a file or a socket on a Linux host.
Steps to reproduce:
e.g. :
The whole point of using splice is to avoid unnecessary cpu cycle.
馃殌 The expected result
bunrouter uses https://pkg.go.dev/net#TCPConn.ReadFrom which allow splice to be used.
The text was updated successfully, but these errors were encountered: