An HTTP server and client, complete with a handwritten request parser.
This code was written for a one-off university project. It is absolutely not battle-tested and was coded to be good enough to pass the class. Use it for inspiration, not production.
$ make
$ ./client/client 8000
$ ./server/server http://localhost:8000/
Only some of HTTP/1.0 was implemented.
The parser does not allow any other methods than GET. It does parse the path and headers.
The server lists files in the current directory
and lets the user download them.
Concurrency is implemented via select
.
It may or may not be susceptible to path-traversal.
The client lets you issue an HTTP/1.0 GET request. That's about it.