Coder Social home page Coder Social logo

jdecorte-be / 42-webserv Goto Github PK

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

HTTP (Hypertext Transfer Protocol) is a protocol for sending and receiving information over the internet.

Makefile 0.68% C++ 94.06% Python 1.23% Perl 0.81% HTML 3.21%
42 42-school 42born2code 42cursus 42projects 42school 42webserv cpp cpp-programming webserver

42-webserv's Introduction

๐Ÿ“– Webserv

HTTP (Hypertext Transfer Protocol)

GitHub code size in bytes Number of lines of code Code language count GitHub top language GitHub last commit

The "Webserv" project, a part of the 42 school's core curriculum, was collaboratively developed by Anastasiia-Ni and AhmadMHammoudeh. This project involves building a web server compatible with C++98 from the ground up. It's designed to handle HTTP requests such as GET, HEAD, POST, PUT, and DELETE, and can serve both static and dynamic content. The server is capable of handling multiple client connections concurrently using the select() method.

Key Features

  • HTTP Request Handling: Processes different types of HTTP requests and serves static or dynamic content.
  • Concurrent Connections: Utilizes select() for managing multiple client connections.
  • Custom Configuration: Allows specifying server settings via a configuration file.
  • CGI Support: Integrates CGI for dynamic content generation.

Usage

To use the server:

make
./webserv [Config File] # Default configuration used if left empty.

Components

  • Server Core: Manages TCP connections, sockets, and data flow.
  • Request Parser: Interprets HTTP requests, extracting methods, paths, headers, and bodies.
  • Response Builder: Constructs HTTP responses with appropriate headers and content.
  • Configuration File: Allows customization of server operations and settings.
  • CGI Integration: Facilitates dynamic content generation through external scripts.

Working Principles

  • HTTP Basics: The server operates on standard HTTP protocols, processing requests and responses.
  • I/O Multiplexing: Utilizes I/O multiplexing for efficient handling of multiple requests.
  • Error Handling: Capable of identifying and responding to various request errors.

Resources and Learning

  • Networking and HTTP Guides: Various resources for understanding HTTP server fundamentals and networking concepts.
  • RFC References: Links to relevant RFCs for in-depth protocol knowledge.
  • CGI Tutorials: Learning resources for CGI implementation in web programming.
  • Support Tools: Tools like Postman and Wireshark recommended for testing and analysis.
  • Additional References: Links to StackOverflow discussions, encoding guides, and other useful resources.

Conclusion

This project encapsulates the essentials of a functional HTTP server, providing a comprehensive understanding of web server architecture, HTTP protocols, networking, and server-side scripting. It's a hands-on approach to learning the intricacies of web server development.

42-webserv's People

Contributors

jdecorte-be avatar

Stargazers

 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.