A non-blocking web server written from scratch in C++98, implementing a subset of the specifications defined in RFC 7230 and related RFCs.
Here are some notable features:
- configurable request body size and timeout limits
- CGI 1.1 support
- file uploads with configurable upload directories
- directory listing
- per-route configuration
- custom error pages
- A Unix-like system
- A C++ compiler with C++98 support like
clang++org++ makesiegefor stress test (optional)
git clone git@github.com:JeeNeeUhs/webserv.git
cd webserv
make./webserv -h
Usage: webserv [OPTION]... [FILE]
Options:
-d, --debug enable debug output
-h, --help print this message
Arguments:
FILE optional config file pathIf no configuration file is provided, program uses ./config/default.conf by default. See example.conf for example.
References used for this project:
- https://www.alimnaqvi.com/blog/webserv
- https://datatracker.ietf.org/doc/html/rfc3875
- https://datatracker.ietf.org/doc/html/rfc1945
- https://datatracker.ietf.org/doc/html/rfc2616
- https://en.wikipedia.org/wiki/Uniform_Resource_Identifier
- https://pypi.org/project/legacy-cgi/
- https://pkg.go.dev/net/http/cgi
- https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.2
- https://github.com/nginx/nginx/blob/d44205284fa41662da803b796d6056fc1e59b1f3/src/http/modules/ngx_http_static_module.c#L148
- https://datatracker.ietf.org/doc/html/rfc2046
- https://datatracker.ietf.org/doc/html/rfc9110
- https://datatracker.ietf.org/doc/html/rfc6265