It looks not too different from the majority of HTTP parsers out there written in C. Here is an example of NodeJS [0].
[0] https://github.com/nodejs/http-parser/blob/main/http_parser....
[0] https://github.com/nodejs/http-parser/blob/main/http_parser....