document all the things; improve req Query semantics; add Form.EnableBufferGrowth

This commit is contained in:
Patricio Whittingslow
2026-07-29 17:01:03 -03:00
parent 29fcec9cb7
commit 17bee3ed48
11 changed files with 183 additions and 111 deletions
+2 -2
View File
@@ -671,7 +671,7 @@ func TestExchangeAppendQuery(t *testing.T) {
var present bool
sm.Handle("/x", func(ex *Exchange) {
var value []byte
value, present = ex.AppendQuery(nil, test.key, test.decoded)
value, present = ex.RequestQueryAppend(nil, test.key, test.decoded)
got = string(value)
})
serve(t, "GET "+test.uri+" HTTP/1.1\r\nHost: h\r\n\r\n", &sm)
@@ -696,7 +696,7 @@ func TestExchangeAppendQueryReusesBuffer(t *testing.T) {
sm.Handle("/x", func(ex *Exchange) {
var value []byte
allocs = testing.AllocsPerRun(50, func() {
value, _ = ex.AppendQuery(dst[:len("prefix:")], "q", true)
value, _ = ex.RequestQueryAppend(dst[:len("prefix:")], "q", true)
})
got = string(value) // Conversion allocates, keep it out of the measurement.
})