mirror of
https://github.com/soypat/lneto.git
synced 2026-08-20 22:49:11 +00:00
httphi router refactor (#176)
* httphi: RouterConfig refactor to enable DefaultRouterConfig * RequestHeader not case sensitive anymore * httphi: use DefaultRouterConfig in examples * httphi: remove gated stage complexity Misusing Stage methods by calling them once header has been written is totally harmless as far as I can tell. We simplify the codebase on this occasion by removing the headerWritten check for all stage methods * httphi: improve APIs * httphi: remove status
This commit is contained in:
@@ -462,6 +462,12 @@ type pairKV struct {
|
||||
value view // value start >0 means value is present.
|
||||
}
|
||||
|
||||
// SizeKV is the heap cost of a single key/value field slot, as reserved by the
|
||||
// numHeaderCapacity argument to [HeaderV1.Reset] and by [Form.Reset]. Callers
|
||||
// budgeting a fixed memory pool up front, such as a Router sizing its
|
||||
// exchanges, multiply it by the pair capacity to account the field table.
|
||||
const SizeKV = int(unsafe.Sizeof(pairKV{}))
|
||||
|
||||
// isValid is for stores parsed in place, where offset 0 is the first key so
|
||||
// only length can signal presence. Empty keys are valid: see valueless cookies.
|
||||
func (pair pairKV) isValid() bool {
|
||||
|
||||
Reference in New Issue
Block a user