for some applications it really might be easier to write a little thing than integrate into some giant framework. and I do think that building these things really helps one understand what's going on in all those layers
but I have to agree about C. unless the whole point is to ingrate with some existing codebase, there are several language choices which should turn this from a day or two of work to an hour or two - with a more robust outcome
I want to consume HTTP headers at the lowest possible level. The webserver would output a custom log file for direct consumption.
There are certainly off the shelf options, but I enjoy reinventing the wheel and dislike dependencies. I'd like to use C because I have interest in OS level webservers.
I would probably go for rust over c if the only reason for c is "os level". But either way, this is for requests from "real" http clients, eg: web browsers? Presumably you're already "trapped" at a pretty high level, like tls, http/2 etc?
Otoh, if low level is what you want, maybe look at:
Sounds like something nginx might handle via lua scripting?
Otherwise, maybe you want: https://github.com/lammertb/libhttp
Or you might want to look at either of:
https://www.acme.com/software/thttpd/
https://github.com/openbsd/src/tree/master/usr.sbin/httpd
If you really want to build (another) web server in C.
Not entirely clear why want to use C for this, though?