Skip to content

C Http Server

License

Notifications You must be signed in to change notification settings

txsoura/C-http-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C HTTP Server

This is a simple HTTP server written in C using sockets.

Installation

Follow the steps bellow, to install:

  1. Install make

If you are in a linux distribution OS, this step is not needed

  1. In the project folder, run the command bellow, to install:
make

or

make install
  1. Run the server with the command:
make run
  1. The server will be available in http://localhost:8383

Features

  • Accepts GET & HEAD requests
  • In the default path returns the index.html
  • If the entered route not exists, return 404
  • If the request came with invalid method, return 405

Available status codes

200 (OK)

404 (Not Found)

405 (Method Not Allowed)