{"id":21429592,"url":"https://github.com/mayank-02/tritonhttp","last_synced_at":"2026-05-11T16:37:39.921Z","repository":{"id":246732111,"uuid":"816617657","full_name":"mayank-02/tritonhttp","owner":"mayank-02","description":"Lightweight HTTP/1.1 server focused on handling GET requests efficiently, concurrency and response handling","archived":false,"fork":false,"pushed_at":"2024-06-30T03:03:39.000Z","size":1069,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T21:48:39.033Z","etag":null,"topics":["concurrency","golang","http1-1","networking","web-server"],"latest_commit_sha":null,"homepage":"","language":"Go","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/mayank-02.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-18T05:12:34.000Z","updated_at":"2025-02-12T19:20:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"d3ed11dd-2802-4948-ac9f-cfd2ce2d0993","html_url":"https://github.com/mayank-02/tritonhttp","commit_stats":null,"previous_names":["mayank-02/tritonhttp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mayank-02/tritonhttp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayank-02%2Ftritonhttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayank-02%2Ftritonhttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayank-02%2Ftritonhttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayank-02%2Ftritonhttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mayank-02","download_url":"https://codeload.github.com/mayank-02/tritonhttp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayank-02%2Ftritonhttp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32903767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["concurrency","golang","http1-1","networking","web-server"],"created_at":"2024-11-22T22:18:24.059Z","updated_at":"2026-05-11T16:37:39.900Z","avatar_url":"https://github.com/mayank-02.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg align=\"right\" src=\"./doc/logo.png\" width=\"18%\"\u003e\n\n# TritonHTTP\n\nTritonHTTP is a lightweight web server that implements a subset of the HTTP/1.1 protocol, specifically designed to handle GET requests. This project is a practical exploration of HTTP server functionalities, focusing on concurrency, request parsing, and response handling.\n\n## Features\n\n- Basic Web Server: Listens for connections and processes HTTP requests from clients.\n- Persistent Connections: Supports reuse of TCP connections for improved efficiency.\n- Request Handling: Properly parses and responds to HTTP GET requests.\n- Error Responses: Implements appropriate HTTP status codes (200, 400, 404).\n- Virtual Hosting: Supports multiple hostnames, mapping to unique directories.\n- Timeout Mechanism: Closes connections after a configurable timeout period.\n\n### Supported HTTP Headers\n\n- **Request Headers**:\n  - `Host` (required)\n  - `Connection` (optional)\n- **Response Headers**:\n  - `Date`\n  - `Last-Modified`\n  - `Content-Type`\n  - `Content-Length`\n  - `Connection`\n\nFor detailed specification, refer to `docs/theory.pdf`.\n\n## Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/mayank-02/tritonhttp.git\ncd tritonhttp\n\n# Install dependencies\ngo mod tidy\n\n# Run tests\ngo test ./...\n\n# Run the server\ngo run server.go\n\n# Open your browser and navigate to `http://localhost:PORT`.\n```\n\n## Configuration\n\n* Virtual Hosts: Define your host-to-directory mappings in virtual_hosts.yaml.\n* Server Port: Modify the default port in the configuration section of main.go if needed.\n\n## Testing\n\nAutomated tests are provided to verify server functionality:\n\n```\ngo test -v\n```\n\n\nYou can also use command-line tools like `curl` or `netcat` to test the server responses. Example:\n\n```bash\ncurl -v http://localhost:PORT/path/to/resource\n```\n\n## Contributions\n\nContributions are welcome! Please fork the repository and submit a pull request for review.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayank-02%2Ftritonhttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmayank-02%2Ftritonhttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayank-02%2Ftritonhttp/lists"}