- Tiny is a simple, multi-threaded
HTTP/1.0 Web
server that usesGET
method to serve static and dynamic content. - It combines many important ideas like process control, Unix I/O, socket interface and HTTP protocol.
- While it lacks many of real web servers features, it can serve serve both static and dynamic content to a real Web browser.
- The
main
routine opens a listen port to recieve the connection requests. - The
server
function does its job through:- parse the HTTP request.
- parse the uri.
- serve the content.
- Linux or any UNIX-like OS.
- git.
- gcc.
- make.
- Use the following commands to download and compile the source code:
git clone https://github.com/IslamWalid/tiny_web_server
cd tiny_web_server
make
- Run Tiny:
./tiny <port>
-
Send an HTTP request to it using:
telnet:
telnet localhost <port>
Web browser:
http://localhost:<port>
Example using telnet:
Example using browser:
Another example using browser: