Fix: Allows headers without whitespace after colon. by AlliBalliBaba · Pull Request #1741 · php/frankenphp
I rewrote the header splitting to ignore all whitespaces after ':', it will now also directly allocate key and value from the *char.
This is a bit faster than strings.SplitN(C.GoStringN(cstringForSplit, length), ": ", 2), but only a small optimization in the context of a whole request.
Test with go test -bench=. (only splitting this specific header without adding it: "Header-Key: value")
BenchmarkHeaderSplitOld-20 21330975 50.82 ns/op
BenchmarkHeaderSplitNew-20 39266910 29.69 ns/op