This project is here to make you write your HTTP server. You will be able to test it with a real browser. HTTP is one of the most used protocols on the internet. Knowing its arcane will be useful, even if you won’t be working on a website.
Tutorials
- Building a simple web serveur in c++
- C++ Web Programming: CGI program
- HTTP
- Build a simple HTTP server from scratch
- Manage a socket flow of events using poll()
- C++ programming applied to network (in French)
- Network programming
HTTP documentation
- RFC 2616: HTTP 1.1 protocol
- RFC 7230: HTTP/1.1 Message Syntax and Routing
- List of HTTP status codes
- Content-Type
- Content-Type Stack List
- Content-Type Full List
- Tres bon site aussi !
- HTTP messages
- Redirections
Useful RFCs
- RFC editor: official source for RFCs on the World Wide Web.
- RFC 2396: Uniform Resource Identifiers (URI): Generic Syntax: useful definitions of URI, port and host
Useful C functions
- socket: creates an endpoint for communication and returns a file descriptor that refers to that endpoint.
- listen: listens for connections on a socket.
- poll: waits for one of a set of file descriptors to become ready to perform I/O.
- accept: accepts a connection on a socket.
CGI Doc
- RFC 3875: CGI
- Best CGI Exemple: Programmation CGI in C++.
- CGI Environmnent Variables
- Good CGI Howto (and cookies)
- Some exemples
Tools
- Super Mega Site pour tester les Headers !
- cURL "--resolve"; curl -H "Host: ..." (for testing different server names).
Server model: nginx documentation