I recently wrote a small C code which uses sockets to listen on a port. It simply echos back the request made to it by a browser. It creates a thread for daemon process and also for servicing new requests. I am doing it simply to learn more about webservers in general. I wanted to know what to do ahead?
I was planning to read the RFC for http. Many questions already answered on StackOverflow suggest going through open source webserver like apache or lighthttp, but I dont know how to start reading such open source projects?
This is a really good book on HTTP. I recommend getting started with that then maybe the relevant RFC’s. Also maybe check out the source of libcurl, a c library for http, https, ftp etc. Hope this helps 🙂
Also Tiny HTTPd is a small http server someone wrote for a school project, you can learn a lot from the source from that.
This is simple http client in c.