rproxy: read the rest of a Connection: close visitor's body after an early answer (closes #373)
check / check (push) Waiting to run
check / check (push) Waiting to run
Go's server reads the body left unread once the handler returns, but not for a request with Connection: close: it closes the connection with the rest unread, and the visitor, still sending, gets a reset. rproxy now reads that rest itself once it has answered, up to the 256 KiB Go's server reads, until the deadline already set on the connection. Model: opus-5-5
This commit is contained in:
1 parent
aaa9719f02
commit
39430dca22
3 files changed
+84
-2
No files matched your search
@@ -169,6 +169,7 @@ func newWAFTransport() *http.Transport {
|
||||
// it writes the request's log line and sends its report.
|
||||
func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
rq := h.newRequest(w, r)
|
||||
defer rq.readRestOfBody()
|
||||
defer rq.finish(r.Context())
|
||||
|
||||
if r.Method == http.MethodGet && r.URL.Path == waf.HealthPath {
|
||||
|
||||
Reference in new issue
Block a user