A high-performance, lightweight HTTP message parser written in C for requests and responses.
http-parser is a lightweight HTTP message parser written in C, designed to parse both requests and responses efficiently. It solves the need for a fast, secure parsing foundation in performance-sensitive HTTP applications like web servers and proxies, without dependencies or memory allocations.
C developers building high-performance HTTP servers, proxies, or embedded networking applications where control over parsing behavior and resource usage is critical.
Developers choose http-parser for its minimal footprint, zero-copy design, and security features, offering a reliable, battle-tested core for custom HTTP implementations without the bloat of larger frameworks.
http request/response parser for c
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Parses HTTP messages without buffering or allocating memory, using only about 40 bytes per connection stream, as stated in the README, minimizing overhead for performance-critical applications.
Implemented purely in C with no reliance on other libraries, making it easy to integrate into minimal or embedded systems without bloat.
Designed to defend against buffer overflow attacks, ensuring robustness in networked applications, a key feature highlighted in the README.
Handles persistent connections, chunked encoding, and protocol upgrades like WebSocket, as detailed in the 'Special Problem of Upgrade' section, providing flexibility for various HTTP use cases.
The README explicitly states the project is not actively maintained and recommends migrating to llhttp, meaning no new features, bug fixes, or security updates.
Requires setting up multiple callbacks and managing state manually, which can be error-prone and tedious compared to more integrated or higher-level HTTP libraries.
Only supports HTTP/1.x features; lacks modern protocols like HTTP/2 or HTTP/3, which are essential for contemporary web applications and performance optimizations.