A hardened HTTP/1.1 parser for .NET
Zero-allocation request parsing with full RFC 9110/9112 validation, resource limits, and
request-smuggling defenses — fused into a single zero-copy pass. Pure managed, native C core, or
picohttpparser-fast: three packages, one BinaryRequest.
Pick a package
Glyph11 →
The hardened parser in pure C#. Dependency-free, runs on any .NET target. Full validation, returns a BinaryRequest.
Glyph11.Native →
The same validation via the C core (P/Invoke), at native speed. Zero allocation; native binary bundled for 6 RIDs.
Glyph11.Pico →
Fastest path to a BinaryRequest: picohttpparser tokenizes, managed glue fills the request. picohttpparser-level validation only.
Install
# the hardened, dependency-free parser
dotnet add package Glyph11
# the C core via P/Invoke (native binaries bundled)
dotnet add package Glyph11.Native
# the picohttpparser-backed fast parser
dotnet add package Glyph11.Pico
At a glance
| Package | Engine | Output | Validation | Dependencies |
|---|---|---|---|---|
| Glyph11 | pure C# | BinaryRequest | full (RFC + smuggling) | none |
| Glyph11.Native | C core / P/Invoke | raw field spans | full (same as managed) | libglyph11 per RID |
| Glyph11.Pico | picohttpparser | BinaryRequest | picohttpparser only | libglyph11pico + Glyph11 |
Glyph11 and Glyph11.Pico fill the identical BinaryRequest, so swapping between them is a one-line change.
Which one?
| If you want… | Use |
|---|---|
| Maximum portability, zero native deps, full hardening | Glyph11 |
| The hardened parser at native speed, zero allocation | Glyph11.Native |
The fastest path to a BinaryRequest, validating elsewhere | Glyph11.Pico |
Performance
Contiguous request parse, 32 KB header block, linux-x64, ns/op (lower is better):
| Glyph11 | Glyph11.Native | Glyph11.Pico |
|---|---|---|
| 5251 ns | 3752 ns | 3370 ns |
See the benchmarks for contiguous, multi-segment, and chunked across all sizes.