fix tests after excplicit header alloc change

This commit is contained in:
Patricio Whittingslow
2026-07-27 12:22:20 -03:00
parent 0e2f487e9f
commit 0d1f50fc48
8 changed files with 124 additions and 58 deletions
+2 -2
View File
@@ -252,8 +252,8 @@ func (hb *headerBuf) forEach(cb func(key, value []byte) error) error {
// data with Reset to parse data in-place.
// If buf is nil then the current buffer is reused. There are 3 ways to use Reset:
//
// h.Reset(prealloc[:0]); h.ParseBytes(httpHeader) // Tell header to use a pre-allocated buffer capacity.
// h.Reset(httpHeader); h.Parse() // Parse bytes in place with no copying.
// h.Reset(prealloc[:0], 16); h.ParseBytes(httpHeader) // Tell header to use a pre-allocated buffer capacity.
// h.Reset(httpHeader, 16); h.Parse() // Parse bytes in place with no copying.
// h.Reset(nil) // Reuse buffer previously set in a call to Reset.
func (h *Header) Reset(buf []byte, numHeaderCapacity int) {
const persistentFlags = flagNoBufferGrow