{"id":15047166,"url":"https://github.com/thomas-chqt/webserv","last_synced_at":"2026-01-03T17:07:13.337Z","repository":{"id":257138665,"uuid":"817634866","full_name":"Thomas-Chqt/webserv","owner":"Thomas-Chqt","description":"HTTP server in C++ 98","archived":false,"fork":false,"pushed_at":"2024-09-14T16:20:39.000Z","size":12613,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T13:22:31.112Z","etag":null,"topics":["42","cpp","cpp98","http","http-server"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Thomas-Chqt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-06-20T06:27:37.000Z","updated_at":"2024-09-14T16:22:10.000Z","dependencies_parsed_at":"2024-09-15T02:26:51.620Z","dependency_job_id":null,"html_url":"https://github.com/Thomas-Chqt/webserv","commit_stats":null,"previous_names":["thomas-chqt/webserv"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thomas-Chqt%2Fwebserv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thomas-Chqt%2Fwebserv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thomas-Chqt%2Fwebserv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thomas-Chqt%2Fwebserv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Thomas-Chqt","download_url":"https://codeload.github.com/Thomas-Chqt/webserv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254341119,"owners_count":22054983,"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","cpp","cpp98","http","http-server"],"created_at":"2024-09-24T20:54:59.289Z","updated_at":"2026-01-03T17:07:13.267Z","avatar_url":"https://github.com/Thomas-Chqt.png","language":"C++","readme":"Webserv\n=======\n\nWebserv is a lightweight HTTP server built in C++98, capable of serving static websites, handling CGI execution, and supporting file uploads. It is the first C++ project in the 42 cursus.\n\nTo get more information about the subject, please refer to [Subject.pdf](Subject.pdf).\n\nKey Features\n------------\n\n- HTTP 1.1 compliant\n- Static website serving\n- CGI execution support with multiple scripting or programming languages (e.g., Python, PHP)\n- File upload support using PUT or POST (via HTML forms and built-in CGI)\n- Configurable via a simple config file\n- Supports GET, POST, PUT, and DELETE methods\n- Support for session cookies\n- Auto index shows the directory content when activated in the config file\n\nBuild\n-----\n\nWebserv can be built on macOS and Linux using CMake. The following commands build the server:\n\n```sh\nmkdir build\ncmake -S . -B build\ncmake --build build\n```\n\nTo build the unit tests, use the `WEBSERV_BUILD_TESTS` CMake option.\n\nUsage\n-----\nOnce built, the server can be run with a configuration file passed as an argument. If no argument is provided, it defaults to configs/webserv.conf.\n\n```sh\n./build/webserv configs/webserv.conf\n```\n\nCommands:\n\n- `reload`: Reload the configuration file without restarting the server.\n- `quit`: Shut down the server.\n\nThe configuration file format is documented through comments in the default webserv.conf file. Users should also ensure that the path to the Python interpreter is valid when using CGI functionality.\n\nTechnical Details\n-----------------\nWebserv uses subclasses of the `IOTask` class to handle different types of I/O operations.  \nEach task is executed by the `IOManager`, which ensures that all I/O operations pass through `select`.  \nShared pointers are used to manage socket and file descriptor lifetimes, ensuring that they are properly closed once all operations are completed.\n\nChallenges\n----------\nComplying with the HTTP/1.1 standard, especially persistent connections and CGI protocol integration, required significant research and testing. Additionally, the use of C++98 introduced limitations, particularly with modern development practices.\n\nGroup Project and Collaboration\n-------------------------------\nWebserv was developed as a group project by three people. My primary focus was on request handling, which helped deepen my understanding of the HTTP protocol and socket API. This project also allowed me to enhance my Git and GitHub skills through group collaboration.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomas-chqt%2Fwebserv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomas-chqt%2Fwebserv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomas-chqt%2Fwebserv/lists"}