{"id":32806389,"url":"https://github.com/goosewin/goose-http","last_synced_at":"2025-11-06T14:01:40.881Z","repository":{"id":322329485,"uuid":"1089068140","full_name":"goosewin/goose-http","owner":"goosewin","description":"HTTP/1.1 server for Rust implementing RFC 9110/9111/9112 semantics, caching, and range handling","archived":false,"fork":false,"pushed_at":"2025-11-03T21:31:02.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-03T23:21:33.496Z","etag":null,"topics":["http","http-1-1","http-server","rfc-9110","rfc-9111","rfc-9112","rust","rust-crate","rust-lang"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goosewin.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-03T20:57:07.000Z","updated_at":"2025-11-03T21:31:05.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/goosewin/goose-http","commit_stats":null,"previous_names":["goosewin/goose-http"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/goosewin/goose-http","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goosewin%2Fgoose-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goosewin%2Fgoose-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goosewin%2Fgoose-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goosewin%2Fgoose-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goosewin","download_url":"https://codeload.github.com/goosewin/goose-http/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goosewin%2Fgoose-http/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":283019357,"owners_count":26765637,"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","status":"online","status_checked_at":"2025-11-06T02:00:06.180Z","response_time":55,"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":["http","http-1-1","http-server","rfc-9110","rfc-9111","rfc-9112","rust","rust-crate","rust-lang"],"created_at":"2025-11-06T14:00:54.677Z","updated_at":"2025-11-06T14:01:40.864Z","avatar_url":"https://github.com/goosewin.png","language":"Rust","readme":"# Goose HTTP\n\n[![Crates.io](https://img.shields.io/crates/v/goose-http.svg)](https://crates.io/crates/goose-http)\n\nGoose HTTP is a from-scratch implementation of an HTTP/1.1 server written in\nRust. It adheres to the 2022 HTTPbis specification split:\n\n- [RFC 9110: HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html)\n- [RFC 9111: Caching](https://www.rfc-editor.org/rfc/rfc9111.html)\n- [RFC 9112: HTTP/1.1](https://www.rfc-editor.org/rfc/rfc9112.html)\n\nThe project is intentionally minimal but complete—it implements message\nframing, request parsing, conditional requests, Range handling, caching\nsemantics, connection management, and a fully asynchronous runtime using\nTokio.\n\n## Installation\n\n```bash\ncargo add goose-http\n```\n\nOr add it manually to your `Cargo.toml`:\n\n```toml\n[dependencies]\ngoose-http = \"0.1\"\n```\n\n## Getting Started\n\n### Prerequisites\n\n- Rust toolchain (1.75+ recommended)\n- `cargo` for building and running\n\n### First steps\n\n1. **Create a project**\n   ```bash\n   cargo new hello-goose\n   cd hello-goose\n   ```\n\n2. **Add Goose HTTP**\n   ```bash\n   cargo add goose-http\n   ```\n\n3. **Wire up a basic server** – drop this into `src/main.rs`:\n\n   ```rust\n   use goose_http::{\n       router,\n       request::Request,\n       response::Response,\n       common::StatusCode,\n       Server,\n   };\n\n   fn handle_root(_req: Request) -\u003e Response {\n       let mut res = Response::new(StatusCode::OK);\n       res.set_body_text_static(\"Hello from Goose HTTP!\\n\");\n       res\n   }\n\n   #[tokio::main]\n   async fn main() -\u003e anyhow::Result\u003c()\u003e {\n       let router = router().get(\"/\", handle_root).build();\n       let server = Server::builder().with_addr(\"127.0.0.1:8080\").with_handler(router).build();\n       println!(\"Listening on {}\", server.addr());\n       server.run().await?;\n       Ok(())\n   }\n   ```\n\n4. **Run it**\n   ```bash\n   cargo run\n   ```\n\nYou now have a minimal HTTP/1.1 server that speaks the Goose HTTP stack.\n\n### Example Harness\n\n```bash\ncargo run --bin compliance_harness -- --help\n```\n\nThe compliance harness binds to `127.0.0.1:18080` by default and exposes sample\nroutes that exercise validators, range requests, and caching semantics. It is\nused to drive the conformance suites under `scripts/compliance/`.\n\n### Testing\n\n```bash\ncargo test\n```\n\nUnit tests cover parsers, caching helpers, and range utilities. Integration\ntests in `tests/http_flow.rs` spin up the server to verify `Expect:\n100-continue`, pipelined responses, and multi-range responses end-to-end.\n\n## Project Layout\n\n- `src/conn/`: Connection state machine, keep-alive \u0026 pipelining logic, timeout\n  handling, conditional request evaluation.\n- `src/parse/`: Request-line, header parsing, and body framing (Content-Length \u0026\n  chunked) strictly following RFC 9112.\n- `src/encode/`: Response serialization including chunked transfer-coding,\n  trailers, and mandatory headers (Date, Connection).\n- `src/cache/`: Cache-Control parsing, freshness calculations, Age defaults.\n- `src/range/`: Range header parsing and satisfiable range computation.\n- `src/request/` \u0026 `src/response/`: Typed representations of HTTP messages with\n  convenience builders.\n- `src/server/`: Tokio accept loop, connection orchestration, configurable\n  timeouts and structured logging.\n- `src/log/`: Tracing-based logging façade with lazy initialisation.\n- `src/bin/compliance_harness.rs`: Compliance test harness used for automated\n  suites.\n\n## Logging \u0026 Diagnostics\n\nLogging is powered by the [`tracing`](https://crates.io/crates/tracing) crate.\nCall `goose_http::log::init()` once during application startup (the demo binary\ndoes this automatically). Environment-based filtering is supported via\n`RUST_LOG`.\n\n## License\n\nThis project is released under the CC0-1.0 license. See `LICENSE` for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoosewin%2Fgoose-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoosewin%2Fgoose-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoosewin%2Fgoose-http/lists"}