{"id":23148270,"url":"https://github.com/drkwitht/h1c-http-server","last_synced_at":"2025-04-04T13:44:52.715Z","repository":{"id":195125228,"uuid":"689504607","full_name":"DrkWithT/H1C-Http-Server","owner":"DrkWithT","description":"First attempt at a HTTP server in C.","archived":false,"fork":false,"pushed_at":"2023-12-03T05:19:57.000Z","size":127,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T23:30:04.084Z","etag":null,"topics":["c","http-server","socket-programming","toy-project"],"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/DrkWithT.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}},"created_at":"2023-09-10T02:42:17.000Z","updated_at":"2023-11-26T06:09:25.000Z","dependencies_parsed_at":"2023-12-03T05:26:31.116Z","dependency_job_id":"8b30cc47-5e92-4f3b-aca1-d408e2364b32","html_url":"https://github.com/DrkWithT/H1C-Http-Server","commit_stats":null,"previous_names":["drkwitht/h1c-http-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrkWithT%2FH1C-Http-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrkWithT%2FH1C-Http-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrkWithT%2FH1C-Http-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrkWithT%2FH1C-Http-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DrkWithT","download_url":"https://codeload.github.com/DrkWithT/H1C-Http-Server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247189594,"owners_count":20898692,"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":["c","http-server","socket-programming","toy-project"],"created_at":"2024-12-17T17:09:58.660Z","updated_at":"2025-04-04T13:44:52.695Z","avatar_url":"https://github.com/DrkWithT.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README\n\n## Brief\nThis repo contains files and code for a minimal, toy HTTP/1.x server. *nix systems and Linux distros should support the C standard library and UNIX networking headers, but Windows will not. Not for production usage but for learning purposes.\n\n## References\n - [HTTP 1.x Introduction](https://jmarshall.com/easy/http/)\n\n## Usage\n - Run `make all` to build the program.\n - Enter `./h1cserver` to run the server on default port 8080.\n - Enter `./h1cserver n` to run the server on port n where n is at least 1024.\n - Enter `make clean \u0026\u0026 make all` after changes to refresh the build.\n\n## To Do's\n 1. ~~Implement response writer.~~\n 2. ~~Implement and fill in main server \"object\".~~\n 3. ~~Refactor server to send `Date: xxx` header.~~\n 4. Refactor server to use route handler logic.\n    - ~~Implement static resources.~~\n    - ~~Implement date utility and resource cache before packing them into a context object.~~\n    - ~~Add context argument to callback \u0026 fallback function signatures.~~\n    - ~~Integrate `RouteMap` into main server logic.~~\n    - ~~Possibly refactor server to use thread pools: `BlockedQueue`, `ServerListener`, `ServerWorker`~~\n    - Fix server to gracefully exit on `SIGINT`. Currently the CTRL+C keystroke does not cleanly exit: the first time only prints the exiting message. Even then there is a double free almost certainly within the called cleanup code per worker. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrkwitht%2Fh1c-http-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrkwitht%2Fh1c-http-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrkwitht%2Fh1c-http-server/lists"}