{"id":33930792,"url":"https://github.com/nigma143/actix-web-buffering","last_synced_at":"2026-04-07T15:31:25.743Z","repository":{"id":41901929,"uuid":"344546076","full_name":"nigma143/actix-web-buffering","owner":"nigma143","description":"Request/Response body buffering with support spooled to a temp file on disk","archived":false,"fork":false,"pushed_at":"2025-06-22T09:04:21.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-13T22:14:07.884Z","etag":null,"topics":["actix","actix-web","buffering","request","response"],"latest_commit_sha":null,"homepage":"","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/nigma143.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}},"created_at":"2021-03-04T16:55:26.000Z","updated_at":"2025-06-22T09:04:25.000Z","dependencies_parsed_at":"2022-08-11T20:40:36.230Z","dependency_job_id":null,"html_url":"https://github.com/nigma143/actix-web-buffering","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nigma143/actix-web-buffering","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigma143%2Factix-web-buffering","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigma143%2Factix-web-buffering/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigma143%2Factix-web-buffering/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigma143%2Factix-web-buffering/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nigma143","download_url":"https://codeload.github.com/nigma143/actix-web-buffering/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigma143%2Factix-web-buffering/sbom","scorecard":{"id":686820,"data":{"date":"2025-08-11","repo":{"name":"github.com/nigma143/actix-web-buffering","commit":"44465dc4691bd58c0ae9d0ef839b03a644b8a714"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/13 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/crates.io.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/nigma143/actix-web-buffering/crates.io.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/crates.io.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/nigma143/actix-web-buffering/crates.io.yml/main?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/crates.io.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T01:09:05.608Z","repository_id":41901929,"created_at":"2025-08-22T01:09:05.608Z","updated_at":"2025-08-22T01:09:05.608Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31518413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["actix","actix-web","buffering","request","response"],"created_at":"2025-12-12T12:11:22.254Z","updated_at":"2026-04-07T15:31:25.738Z","avatar_url":"https://github.com/nigma143.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Documentation](https://docs.rs/actix-web-buffering/badge.svg)](https://docs.rs/actix-web-buffering)\n[![crates.io](https://img.shields.io/crates/v/actix-web-buffering.svg)](https://crates.io/crates/actix-web-buffering)\n\n# actix-web-buffering\n\nRequest/Response body buffering with support spooled to a temp file on disk\n\nUse it in actix-web middleware. For example this is used at [actix-web-detached-jws-middleware](https://crates.io/crates/actix-web-detached-jws-middleware)\n\n## Example:\n```rust\nuse std::{\n    cell::RefCell,\n    pin::Pin,\n    rc::Rc,\n    sync::Arc,\n    task::{Context, Poll},\n};\n\nuse actix_service::Transform;\nuse actix_web::{\n    dev::{Body, Service, ServiceRequest, ServiceResponse},\n    web,\n    web::BytesMut,\n    App, Error, HttpMessage, HttpResponse, HttpServer, Responder,\n};\nuse actix_web_buffering::{\n    enable_request_buffering, enable_response_buffering, FileBufferingStreamWrapper,\n};\nuse futures::{\n    future::{ok, Ready},\n    stream::StreamExt,\n    Future, FutureExt,\n};\n\n#[actix_web::main]\nasync fn main() -\u003e std::io::Result\u003c()\u003e {\n    let wrapper = FileBufferingStreamWrapper::new()\n        .tmp_dir(std::env::temp_dir())\n        .threshold(1024 * 30)\n        .produce_chunk_size(1024 * 30)\n        .buffer_limit(Some(1024 * 30 * 10));\n\n    let wrapper = Arc::new(wrapper);\n\n    HttpServer::new(move || {\n        let r1 = Arc::clone(\u0026wrapper);\n        let r2 = Arc::clone(\u0026wrapper);\n        App::new()\n            .wrap(Example(r1))\n            .wrap(Example(r2))\n            .service(web::resource(\"/\").route(web::post().to(echo)))\n    })\n    .bind(\"127.0.0.1:8080\")?\n    .run()\n    .await\n}\n\nasync fn echo(req_body: String) -\u003e impl Responder {\n    HttpResponse::Ok().body(req_body)\n}\n\nstruct Example(Arc\u003cFileBufferingStreamWrapper\u003e);\n\nimpl\u003cS\u003e Transform\u003cS\u003e for Example\nwhere\n    S: Service\u003cRequest = ServiceRequest, Response = ServiceResponse\u003cBody\u003e, Error = Error\u003e + 'static,\n{\n    type Request = ServiceRequest;\n    type Response = ServiceResponse\u003cBody\u003e;\n    type Error = Error;\n    type InitError = ();\n    type Transform = ExampleMiddleware\u003cS\u003e;\n    type Future = Ready\u003cResult\u003cSelf::Transform, Self::InitError\u003e\u003e;\n\n    fn new_transform(\u0026self, service: S) -\u003e Self::Future {\n        ok(ExampleMiddleware {\n            service: Rc::new(RefCell::new(service)),\n            wrapper: Arc::clone(\u0026self.0),\n        })\n    }\n}\npub struct ExampleMiddleware\u003cS\u003e {\n    service: Rc\u003cRefCell\u003cS\u003e\u003e,\n    wrapper: Arc\u003cFileBufferingStreamWrapper\u003e,\n}\n\nimpl\u003cS\u003e Service for ExampleMiddleware\u003cS\u003e\nwhere\n    S: Service\u003cRequest = ServiceRequest, Response = ServiceResponse\u003cBody\u003e, Error = Error\u003e + 'static,\n{\n    type Request = ServiceRequest;\n    type Response = ServiceResponse\u003cBody\u003e;\n    type Error = Error;\n    type Future = Pin\u003cBox\u003cdyn Future\u003cOutput = Result\u003cSelf::Response, Self::Error\u003e\u003e\u003e\u003e;\n\n    fn poll_ready(\u0026mut self, cx: \u0026mut Context\u003c'_\u003e) -\u003e Poll\u003cResult\u003c(), Self::Error\u003e\u003e {\n        self.service.poll_ready(cx)\n    }\n\n    fn call(\u0026mut self, mut req: ServiceRequest) -\u003e Self::Future {\n        let mut svc = self.service.clone();\n        let wrapper = self.wrapper.clone();\n\n        async move {\n            enable_request_buffering(\u0026wrapper, \u0026mut req);\n\n            let mut stream = req.take_payload();\n            let mut body = BytesMut::new();\n            while let Some(chunk) = stream.next().await {\n                body.extend_from_slice(\u0026chunk.unwrap());\n            }\n            req.set_payload(stream);\n            println!(\"request body: {:?}\", body);\n\n            let svc_res = svc.call(req).await?;\n\n            let mut svc_res = enable_response_buffering(\u0026wrapper, svc_res);\n\n            let mut stream = svc_res.take_body();\n            let mut body = BytesMut::new();\n            while let Some(chunk) = stream.next().await {\n                body.extend_from_slice(\u0026chunk.unwrap());\n            }\n            let svc_res = svc_res.map_body(|_, _| stream);\n            println!(\"response body: {:?}\", body);\n\n            Ok(svc_res)\n        }\n        .boxed_local()\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnigma143%2Factix-web-buffering","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnigma143%2Factix-web-buffering","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnigma143%2Factix-web-buffering/lists"}