I am looking for HTTP parsing library for C/C++. I have looked curl library, but it seems it is a http client library. I am looking for a library which parses HTTP header (e.g. a way to get the query string, get cookie, get request url, get Post Data)?
Thank you.
About 6 months ago, I was looking for the same exact thing. Then I found this page: HTTP Made Really Really Easy and I just wrote my own... Works great, surprisingly simple to implement...
Check out libebb, it has a parser generated with Ragel using the easy yet powerful PEG (it's based on Zed Shaw's mongrel parser)
libebb is a lightweight HTTP server library for C. It lays the foundation for writing a web server by providing the socket juggling and request parsing. By implementing the HTTP/1.1 grammar provided in RFC2612, libebb understands most most valid HTTP/1.1 connections (persistent, pipelined, and chunked requests included) and rejects invalid or malicious requests. libebb supports SSL over HTTP.
Also check this speedy parser
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With