{"id":15047252,"url":"https://github.com/acensjj/webserv","last_synced_at":"2026-03-17T09:34:46.277Z","repository":{"id":105924206,"uuid":"345978349","full_name":"AcensJJ/webserv","owner":"AcensJJ","description":"This project is here to make you write your own HTTP server. You will follow the real HTTP RFC and you will be able to test it with a real browser. HTTP is one of the most used protocol on internet. Knowing its arcane will be useful, even if you won’t be working on a website.","archived":false,"fork":false,"pushed_at":"2021-06-11T23:50:43.000Z","size":16787,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-13T23:13:38.044Z","etag":null,"topics":["42","42born2code","cpp","cpp98","webserv"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AcensJJ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-09T11:09:00.000Z","updated_at":"2023-01-09T01:12:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"bf347576-d98a-40fc-97b1-5308d1a7c643","html_url":"https://github.com/AcensJJ/webserv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AcensJJ%2Fwebserv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AcensJJ%2Fwebserv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AcensJJ%2Fwebserv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AcensJJ%2Fwebserv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AcensJJ","download_url":"https://codeload.github.com/AcensJJ/webserv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243495495,"owners_count":20299923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["42","42born2code","cpp","cpp98","webserv"],"created_at":"2024-09-24T20:55:48.115Z","updated_at":"2025-12-28T10:03:27.577Z","avatar_url":"https://github.com/AcensJJ.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg alt=\"42-lyon\" src=\"https://user-images.githubusercontent.com/45235527/106354618-6ec65a00-62f3-11eb-8688-ba9e0f4e77de.jpg\" /\u003e\n\u003c/p\u003e\n\n# Webserv\n\n\u003cimg alt=\"Note\" src=\"https://user-images.githubusercontent.com/45235527/96753610-698e7080-13d0-11eb-9461-d3351c9208d7.png\" width=\"250\" height=\"200\" /\u003e\n\n### \u003cstrong\u003eDescription\u003c/strong\u003e\n\nThis project is here to make you write your own HTTP server. You will\nfollow the real HTTP RFC and you will be able to test it with a real browser. HTTP is\none of the most used protocol on internet. Knowing its arcane will be useful, even if you\nwon’t be working on a website.\n\n\u003e *Contributors:\u003cbr\u003e*\n\u003e -\t   *\u003ca href=\"https://github.com/nemu69\"\u003eNemuel Page Léonie\u003c/a\u003e (\u003ca href=\"https://profile.intra.42.fr/users/nepage-l\"\u003enepage-l\u003c/a\u003e).\u003cbr\u003e*\n\u003e -    *\u003ca href=\"https://github.com/AcensJJ\"\u003eJean-Jacques Acens\u003c/a\u003e (\u003ca href=\"https://profile.intra.42.fr/users/jacens\"\u003ejacens\u003c/a\u003e).*\n\n\u003cp align=\"center\"\u003e\n    \u003cimg alt=\"webserv\" src=\"https://user-images.githubusercontent.com/45235527/121715234-e9dc2000-cade-11eb-9a56-4fb8feb8f3e9.gif\" /\u003e\n\u003c/p\u003e\n\n# Mandatory part\n\n![Sujet](https://user-images.githubusercontent.com/45235527/107391358-e74dc780-6af8-11eb-8f84-b642d9a2495a.png)\n\nYou must write a HTTP server in C++ 98\n- The C++ standard must be C++ 98. Your project must compile with it.\n- It must be conditionnal compliant with the rfc 7230 to 7235 (http 1.1) but you need to implement only the following headers\n    - Accept-Charsets\n    - Accept-Language\n    - Allow\n    - Authorization\n    - Content-Language\n    - Content-Length\n    - Content-Location\n    - Content-Type\n    - Date\n    - Host\n    - Last-Modified\n    - Location\n    - Referer\n    - Retry-After\n    - Server\n    - Transfer-Encoding\n    - User-Agent\n    - WWW-Authenticate\n- You can implement all the headers if you want to\n- We will consider that nginx is HTTP 1.1 compliant and may be use to compare headers and answer behaviors\n- It must be non blocking and use only 1 select for all the IO between the client and the server (listens includes).\n- Select should check read and write at the same time.\n- Your server should never block and client should be bounce properly if necessary\n- You should never do a read operation or a write operation without going through select\n- Checking the value of errno is strictly forbidden after a read or a write operation\n- A request to your server should never hang forever\n- You server should have default error pages if none are provided\n- Your program should not leak and should never crash, (even when out of memory if all the initialisation is done)\n- You can’t use fork for something else than CGI (like php or perl or ruby etc...)\n- You can include and use everything in \"iostream\" \"string\" \"vector\" \"list\" \"queue\" \"stack\" \"map\" \"algorithm\"\n- Your program should have a config file in argument or use a default path\n- In this config file we should be able to:\n    - choose the port and host of each \"server\"\n    - setup the server_names or not\n    - The first server for a host:port will be the default for this host:port (meaning it will answer to all request that doesn’t belong to an other server)\n    - setup default error pages\n    - limit client body size\n    - setup routes with one or multiple of the following rules/configuration (routes wont be using regexp):\n        - define a list of accepted HTTP Methods for the route\n        - define a directory or a file from where the file should be search (for example if url /kapouet is rooted to /tmp/www, url /kapouet/pouic/toto/pouet is /tmp/www/pouic/toto/pouet)\n        - turn on or off directory listing\n        - default file to answer if the request is a directory\n        - execute CGI based on certain file extension (for example .php)\n            -You wonder what a CGI is go? https://en.wikipedia.org/wiki/Common_Gateway_Interface\n            - Because you wont call the cgi directly use the full path as PATH_INFO\n            - Just remember that for chunked request, your server need to unchunked it and the CGI will expect EOF as end of the body.\n            - Same things for the output of the CGI. if no content_length is returned from the CGI, EOF will mean the end of the returned data.\n            - Your program should set the following Meta-Variables\n                - AUTH_TYPE\n                - CONTENT_LENGTH\n                - CONTENT_TYPE\n                - GATEWAY_INTERFACE\n                - PATH_INFO\n                - PATH_TRANSLATED\n                - QUERY_STRING\n                - REMOTE_ADDR\n                - REMOTE_IDENT\n                - REMOTE_USER\n                - REQUEST_METHOD\n                - REQUEST_URI\n                - SCRIPT_NAME\n                - SERVER_NAME\n                - SERVER_PORT\n                - SERVER_PROTOCOL\n                - SERVER_SOFTWARE\n            - Your program should call the cgi with the file requested as first argument\n            - the cgi should be run in the correct directory for relativ path file access\n            - your server should work with php-cgi\n        - make the route able to accept uploaded files and configure where it should be saved\n\nYou should provide some configuration files for evaluation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facensjj%2Fwebserv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facensjj%2Fwebserv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facensjj%2Fwebserv/lists"}