{"id":32806389,"url":"https://github.com/goosewin/goose-http","last_synced_at":"2026-06-29T19:31:04.822Z","repository":{"id":322329485,"uuid":"1089068140","full_name":"goosewin/goose-http","owner":"goosewin","description":"Spec-focused HTTP/1.1 server and compliance harness for Rust.","archived":false,"fork":false,"pushed_at":"2026-06-07T03:34:49.000Z","size":85,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-07T05:03:53.970Z","etag":null,"topics":["caching","http","http-1-1","http-server","rfc-9110","rfc-9111","rfc-9112","rust","rust-crate","rust-lang"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/goose-http","language":"Rust","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/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":"2026-06-07T03:34:51.000Z","dependencies_parsed_at":"2026-06-07T05:01:02.397Z","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":286080680,"owners_count":34941025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"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":["caching","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":"2026-06-29T19:31:04.817Z","avatar_url":"https://github.com/goosewin.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# goose-http\n\n[![Crates.io](https://img.shields.io/crates/v/goose-http.svg)](https://crates.io/crates/goose-http)\n\nSpec-focused HTTP/1.1 server and compliance harness for Rust. Implements RFC\n9110/9111/9112 semantics including caching and range handling.\n\n## Scope\n\n- Request parsing and message framing\n- Conditional requests and cache semantics\n- Range requests and multipart responses\n- Async runtime built on Tokio\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## Quick Start\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   ```\n2. Add goose-http\n   ```bash\n   cargo add goose-http\n   ```\n3. Wire up a basic server in `src/main.rs`\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()\n           .with_addr(\"127.0.0.1:8080\")\n           .with_handler(router)\n           .build();\n       println!(\"Listening on {}\", server.addr());\n       server.run().await?;\n       Ok(())\n   }\n   ```\n4. Run it\n   ```bash\n   cargo run\n   ```\n\n## Compliance Harness\n\n```bash\ncargo run --bin compliance_harness -- --help\n```\n\nThe harness binds to `127.0.0.1:18080` by default and exposes routes that\nexercise validators, range requests, and caching semantics. It drives the\nconformance 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 and pipelining logic,\n  timeouts, conditional request evaluation.\n- `src/parse/`: Request-line, header parsing, and body framing\n  (Content-Length and chunked) following RFC 9112.\n- `src/encode/`: Response serialization including chunked transfer-coding,\n  trailers, and mandatory headers.\n- `src/cache/`: Cache-Control parsing, freshness calculations, Age defaults.\n- `src/range/`: Range header parsing and satisfiable range computation.\n- `src/request/` and `src/response/`: Typed message representations with\n  convenience builders.\n- `src/server/`: Tokio accept loop, connection orchestration, configurable\n  timeouts and structured logging.\n- `src/log/`: Tracing-based logging facade with lazy initialization.\n- `src/bin/compliance_harness.rs`: Compliance test harness for automated suites.\n\n## Logging\n\nLogging is powered by [`tracing`](https://crates.io/crates/tracing). Call\n`goose_http::log::init()` once during application startup (the demo binary does\nthis automatically). Environment-based filtering is supported via `RUST_LOG`.\n\n## License\n\nMIT © Dan Goosewin\n","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"}