Skip to content

sonofenoch/c-http-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C HTTP Server

The following code is a C HTTP Server written with sockets (sys/sockets.h). The purpose of this project was to relearn C, and learn about how the HTTP protocol works.

Note: This server is extremely simple and just demonstrates the basic concept of how HTTP works.

Goal

My goal was to create a simple socket based server that could accept GET and POST requests from curl, and serve an html web page that could be accessed from a browser.

Features

  • GET
    • Returns a very simple HTML web page
  • POST
    • Returns a basic summary of the request it got. This includes all headers, and in the case that a file is present, includes a small print out stating how many bytes of the content type it received in the POST request.

Author: Timothy J Cain (sonofenoch)

About

C HTTP Server Using Sockets

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors