The processing code writes a response to the http socket before exposing the request and path to a closure available by the http module.
This allows anyone to open an extreme number of file descriptors on a linux system and other operating systems that use that construct (tcp stack) for handling timeouts without being able to log it.
https://cs.opensource.google/go/go/+/refs/tags/go1.19.3:src/net/http/server.go;l=2451
The processing code writes a response to the http socket before exposing the request and path to a closure available by the http module.
This allows anyone to open an extreme number of file descriptors on a linux system and other operating systems that use that construct (tcp stack) for handling timeouts without being able to log it.