HTTP (Hypertext Transfer Protocol)
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.
- 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.
To use the server:
make
./webserv [Config File] # Default configuration used if left empty.
- 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.
- 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.
- 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.
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.