{"id":16473084,"url":"https://github.com/binki/streamstreamedduringheadrequest","last_synced_at":"2026-05-26T16:01:56.087Z","repository":{"id":143134268,"uuid":"144869996","full_name":"binki/StreamStreamedDuringHeadRequest","owner":"binki","description":"Demonstration of ASP.NET Web API OWIN issue with StreamContent and HEAD requests","archived":false,"fork":false,"pushed_at":"2022-08-31T02:18:37.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T12:40:36.470Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/binki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2018-08-15T15:22:43.000Z","updated_at":"2022-07-09T01:04:00.000Z","dependencies_parsed_at":"2023-04-10T08:33:55.854Z","dependency_job_id":null,"html_url":"https://github.com/binki/StreamStreamedDuringHeadRequest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/binki/StreamStreamedDuringHeadRequest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binki%2FStreamStreamedDuringHeadRequest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binki%2FStreamStreamedDuringHeadRequest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binki%2FStreamStreamedDuringHeadRequest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binki%2FStreamStreamedDuringHeadRequest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binki","download_url":"https://codeload.github.com/binki/StreamStreamedDuringHeadRequest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binki%2FStreamStreamedDuringHeadRequest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33528089,"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":"ssl_error","status_checked_at":"2026-05-26T15:22:15.568Z","response_time":63,"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":[],"created_at":"2024-10-11T12:25:17.000Z","updated_at":"2026-05-26T16:01:56.031Z","avatar_url":"https://github.com/binki.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"Compile using Visual Studio-15.8+ or `msbuild /restore` and configure IIS Express to see this site. You might place something like this under `\u003csites/\u003e` in `applicationhost.config`:\n\n```xml\n\u003csite name=\"StreamStreamedDuringHeadRequest\" id=\"3\"\u003e\n    \u003capplication path=\"/\"\u003e\n        \u003cvirtualDirectory path=\"/\" physicalPath=\"%USERPROFILE%\\source\\repos\\StreamStreamedDuringHeadRequest\\StreamStreamedDuringHeadRequest\" /\u003e\n    \u003c/application\u003e\n    \u003cbindings\u003e\n        \u003cbinding protocol=\"http\" bindingInformation=\":8080:localhost\" /\u003e\n    \u003c/bindings\u003e\n\u003c/site\u003e\n```\n\nThen start:\n\n```\niisexpress /Site:StreamStreamedDuringHeadRequest\n```\n\nIn another terminal, run a normal `GET` request. You should see that the whole stream is spooled by watching the output of IISExpress and also that the content is properly downloaded to your HTTP client:\n\n```\ncurl -si http://localhost:8080/api/Default\n```\n\nIISExpress output (duplicated `Request ended` is a separate issue reported in https://github.com/aspnet/AspNetWebStack/issues/184):\n\n```\nRequest started: \"GET\" http://localhost:8080/api/Default\nRead(, 0, 4096)\n =1080\nRequest ended: http://localhost:8080/api/Default with HTTP status 200.0\nRead(, 0, 4096)\n =0\nDispose(True)\nRequest ended: http://localhost:8080/api/Default with HTTP status 200.0\n```\n\nNow, run a `HEAD` request. You will see from the IISExpress output that the entire stream is streamed needlessly even though no content is sent to the HTTP client:\n\n```\ncurl -sI http://localhost:8080/api/Default\n```\n\nIISExpress output:\n\n```\nRequest started: \"HEAD\" http://localhost:8080/api/Default\nRead(, 0, 4096)\n =1080\nRequest ended: http://localhost:8080/api/Default with HTTP status 200.0\nRead(, 0, 4096)\n =0\nDispose(True)\nRequest ended: http://localhost:8080/api/Default with HTTP status 200.0\n```\n\n(To verify that no content is sent to the client, you can run the following command which causes `curl` to wait for content. If the server behaves correctly and does **not** send content, then **the following command should hang** after it gets the headers until the connection is terminated by the server or the client is killed. `curl` will also correctly warn you that `-XHEAD` is unlikely to perform correctly):\n\n```\ncurl -siXHEAD http://localhost:8080/api/Default\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinki%2Fstreamstreamedduringheadrequest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinki%2Fstreamstreamedduringheadrequest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinki%2Fstreamstreamedduringheadrequest/lists"}