This seems to be quite well written. However, this is a really bad idea for anything other than learning/hobby work. Writing a web application in C is just asking for security trouble.<p>Writing in C introduces whole families of vulnerability that aren't a problem in most other languages. Format string vulnerabilities and buffer overflows are the two that immediately come to mind, and these will be added to the normal host of web application security considerations like SQLI, CSRF, XSS, etc.