Giter Site home page Giter Site logo

arivima / 42_webserv Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 18.64 MB

simple event-driven HTTP server made from scratch

C++ 74.26% Makefile 2.57% HTML 7.24% JavaScript 4.15% CSS 4.02% Shell 0.12% Perl 2.68% Python 4.95%
binary-files cgi chunked-encoding http-methods http-requests http-server html-css http-delete http-get http-post http-redirects io-multiplexing socket-programming epoll-server 42 42cursus 42roma event-driven

42_webserv's Introduction

- Disclaimer!
+ On this github only the project is final
! Project research, documentation and other supporting documents are work in progress 
! -> readme.md and dir _readme_files 



42_webserv

Simple HTTP server made from scratch description of project

Features of this Webserv

  • Sockets programming : Basic server-client communication (using the <sys/socket.h> lib)
  • Sockets programming : IO multiplexing with epoll suite, sockets are non blocking
  • Web server architecture : based on NGINX architecture (worker process) -> Server data structure, configuration data structure
  • Web server architecture : one worker (one process) is handling all connections using epoll,
  • Configuration files : inspired by Nginx configuration file, see details for directives below
  • Configuration directives : see "./_webserv/configuration_files/README.md"
  • HTTP protocol : 1.1
  • HTTP methods : GET, POST, DELETE
  • HTTP Redirections
  • HTTP error codes : see "./webserv_dictionnary.md"
  • File upload :
  • File download :
  • data type handled : plain/text, binary
  • Chunked encoding
  • dynamic content handled with CGI, CGI scripts in python and perl
  • Timers set to 60 seconds default
  • HTML scripts, CSS
  • uses stream objects instead of file descriptors for most read/write operation except for sockets
  • Error management, leaks, siege

host, listen, server_name, location, method, root, index, autoindex, body_size, error_page, return, exec_cgi, extension_cgi)

Content of this github

_webserv

This folder contains the final and complete version of our Webser, pushed and validated 18/07/23.

./webserv_*

We are aiming to finalize the following documents in the coming weeks, currently they are still work in progress :

  • ./webserv_dictionnary.md
  • ./webserv_research.pdf
  • ./webserv_flowchart.pdf
  • ./webserv_correction_prep.md
  • ./_webserv/configuration_files/README.md

WIP Research is available at : https://docs.google.com/document/d/1i5g1XgHDpUf_c7DF9Sp-EdEj2Bdzipvbjh13hLPty0w/edit?usp=sharing disclaimer : this was our research document during the project and hasn´t been finalized, it's a bit of a mess but there are resourceful information

How to use this Webserv

..TBD

Default Functioning of Our Webserver

The default configuration file is located at configuration_files/default.conf.
The root is always at var/www.
This folder contains all the static files that our webserver can return to the client (html, css, images and even javascript files!).
The index page is located at /html/landing_page.html.

...TBC

42_webserv's People

Contributors

arivima avatar mmarinel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.