{"id":20766990,"url":"https://github.com/binded/broken-http-server","last_synced_at":"2025-03-11T18:51:22.543Z","repository":{"id":57190459,"uuid":"69513522","full_name":"binded/broken-http-server","owner":"binded","description":"A broken HTTP server for testing \u0026 debugging","archived":false,"fork":false,"pushed_at":"2016-09-29T02:41:25.000Z","size":49,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-02-18T21:52:12.691Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/binded.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":"2016-09-29T00:01:03.000Z","updated_at":"2020-07-14T04:32:08.000Z","dependencies_parsed_at":"2022-08-27T12:03:08.104Z","dependency_job_id":null,"html_url":"https://github.com/binded/broken-http-server","commit_stats":null,"previous_names":["blockai/broken-http-server"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binded%2Fbroken-http-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binded%2Fbroken-http-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binded%2Fbroken-http-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binded%2Fbroken-http-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binded","download_url":"https://codeload.github.com/binded/broken-http-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243094590,"owners_count":20235531,"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":[],"created_at":"2024-11-17T11:27:08.650Z","updated_at":"2025-03-11T18:51:22.517Z","avatar_url":"https://github.com/binded.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# broken-http-server\n\n[![Build Status](https://travis-ci.org/blockai/broken-http-server.svg?branch=master)](https://travis-ci.org/blockai/broken-http-server)\n\nA broken HTTP server for testing.\n\n![cli-gif](./stop-writing-body-halfway.gif)\n\n## Install\n\nAs a CLI:\n\n```bash\nnpm install -g broken-http-server\n```\n\nAs a library:\n\n```bash\nnpm install --save-dev broken-http-server\n```\n\nRequires Node v6+\n\n## Usage\n\n```bash\nbroken-http-server [port]\n```\n\nAs a library:\n\n```javascript\nimport startServer from 'broken-http-server'\nstartServer()\n  .then(({ baseURL, close }) =\u003e {\n    console.log(`server listening at ${baseURL}`)\n    console.log('closing server...')\n    return close()\n  }).then(() =\u003e {\n    console.log('server closed')\n  })\n```\n\nSee [./test](./test) directory for more usage examples.\n\n## Routes\n\n**GET /abort**\n\nCloses the socket immediately before replying\n\n**GET /content-length-too-small**\n\nSends `content-length` header which is smaller than the actual body\n\n**GET /content-length-too-large**\n\nSends `content-length` header which is larger than the actual body\n\n**GET /stop-writing-body-halfway**\n\nWrites about half the body but stops half way without closing the\nsocket.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinded%2Fbroken-http-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinded%2Fbroken-http-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinded%2Fbroken-http-server/lists"}