HTTP/1.1 · .NET 8 / 9 / 10

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

PackageEngineOutputValidationDependencies
Glyph11pure C#BinaryRequestfull (RFC + smuggling)none
Glyph11.NativeC core / P/Invokeraw field spansfull (same as managed)libglyph11 per RID
Glyph11.PicopicohttpparserBinaryRequestpicohttpparser onlylibglyph11pico + 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 hardeningGlyph11
The hardened parser at native speed, zero allocationGlyph11.Native
The fastest path to a BinaryRequest, validating elsewhereGlyph11.Pico

Performance

Contiguous request parse, 32 KB header block, linux-x64, ns/op (lower is better):

Glyph11Glyph11.NativeGlyph11.Pico
5251 ns3752 ns3370 ns

See the benchmarks for contiguous, multi-segment, and chunked across all sizes.