yemreaycicek/webserv ? reverse-engineered prompt
Reverse engineered prompt
Build me a small web server in C++98 that can handle real browser traffic without blocking. I want it to read a simple config file like NGINX, listen on one or more ports, serve static pages, show directory listings when enabled, accept file uploads, run CGI scripts like Python files, and support GET, POST, DELETE, and HEAD.
It should handle routes with different roots, default index files, custom error pages, redirects, and body size limits. I want it to stay responsive even with slow clients or hanging CGI processes, and to shut down cleanly when stopped. If you need to, look up current docs online for HTTP details and CGI behavior.
Please make it build with a Makefile, keep the code organized, and include a default config and some simple sample web content so I can run it and test it with a browser or curl right away.
Are you gonna build this?
make sure you review the code using coderabbit