Hold Go's server privately in waf.Server and rproxy.Server (closes #437)
check / check (push) Failing after 1m46s

Neither Server embeds *http.Server any more. Each holds it as a private
field, is its handler, and has Serve, Shutdown, Close and ServeHTTP.
sww's serve hook takes the new daemonServer interface of those first
three, and fx provides each Server as it.

Model: opus-5-5
This commit was merged in pull request #481.
This commit is contained in:
clawbot committed 2026-11-20 01:58:25 +01:00
1 parent 9afbd1b683
commit 1b9ca94774
15 files changed
+134 -54

No files matched your search

+6 -3
View File
@@ -344,8 +344,8 @@ func startProxyWithAlerts(
return startRProxy(t, server.Addr, appURL, env), out, server, alertQueue
}
// serve serves server on a port of its own until the test ends, and sets its
// Addr to where it listens.
// serve serves server on a port of its own until the test ends, and sets
// server.Addr to where it listens.
func serve(t *testing.T, server *wafAndParts) {
t.Helper()
@@ -423,10 +423,13 @@ func startRProxy(
}
// wafAndParts is waf's server with the Params it was built from, so that a
// test can read the parts the server uses.
// test can read the parts the server uses. Addr is where it listens once serve
// has it serving.
type wafAndParts struct {
*waf.Server
waf.Params
Addr string
}
// banAbuseIPDBBlacklist does on w what a fetch of AbuseIPDB's blacklist with