a little http server written completely in c, with the stdlib and bsd sockets!
my old draft can be found here, if so desired.
- supports most requests made with
HTTP/1.1(except forCONNECT) - supports concurrent connections via multithreading
- handles http error responses
- supports custom handlers to process requests
- tls support via openssl (off by default)
- serves text & binary files (see mimetype.c for supported mimetypes)
./build/httpsrv servedir [config]
any file located in the servedir will automatically be served by the file. any / path will automatically relocate to index.html.
the config file is by default located at ./config.conf. an example config file can be found on this repo.
handlers for http routes can be written using the HANDLER_FUNC & HANDLER macros. there is an example located in the src/main.c file.