Title: Reopen of: Problems with cooperation between http and pipeline/"for await" · Issue #49429 · nodejs/node · GitHub
Open Graph Title: Reopen of: Problems with cooperation between http and pipeline/"for await" · Issue #49429 · nodejs/node
X Title: Reopen of: Problems with cooperation between http and pipeline/"for await" · Issue #49429 · nodejs/node
Description: Version v20.5.1 Platform Darwin Kernel Version 22.6.0 Subsystem http What steps will reproduce the bug? #38262 #38262 (comment) This often stops after the first iteration: let http = require("http"); let server = http.createServer(async ...
Open Graph Description: Version v20.5.1 Platform Darwin Kernel Version 22.6.0 Subsystem http What steps will reproduce the bug? #38262 #38262 (comment) This often stops after the first iteration: let http = require("http"...
X Description: Version v20.5.1 Platform Darwin Kernel Version 22.6.0 Subsystem http What steps will reproduce the bug? #38262 #38262 (comment) This often stops after the first iteration: let http = require("...
Opengraph URL: https://github.com/nodejs/node/issues/49429
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Reopen of: Problems with cooperation between http and pipeline/\"for await\"","articleBody":"### Version\n\nv20.5.1\n\n### Platform\n\nDarwin Kernel Version 22.6.0\n\n### Subsystem\n\nhttp\n\n### What steps will reproduce the bug?\n\nhttps://github.com/nodejs/node/issues/38262\nhttps://github.com/nodejs/node/issues/38262#issuecomment-991233190\n\nThis often stops after the first iteration:\n\n``` js\nlet http = require(\"http\");\n\nlet server = http.createServer(async function(req, res)\n{\n\ttry\n\t{\n\t\tlet len = 0;\n\t\tfor await (let chunk of req)\n\t\t{\n\t\t\tlen += chunk.length;\n\t\t\tif(len > 2) throw \"payload too large\";\n\t\t}\n\t\tres.end(\"ok\");\n\t}\n\tcatch(err)\n\t{\n\t\tconsole.log(\"server log:\", err);\n\t\tres.end(err);\n\t}\n});\n\n(async function()\n{\n\tawait new Promise(resolve => server.listen(8888, resolve));\n\tlet agent = new http.Agent({ keepAlive: true });\n\tlet data = Buffer.alloc(1000000);\n\tfor(let i = 0; ; i++)\n\t{\n\t\tconsole.log(i);\n\t\tlet req = http.request({ port: 8888, method: \"post\", agent }).end(data);\n\t\tlet res = await new Promise((resolve, reject) => req.on(\"response\", resolve).on(\"error\", reject));\n\t\tlet str = \"\";\n\t\tfor await (let chunk of res) str += chunk;\n\t\tconsole.log(str);\n\t}\n}());\n```\n\n### How often does it reproduce? Is there a required condition?\n\nOften.\n\n### What is the expected behavior? Why is that the expected behavior?\n\nIt should continue.\n\n### What do you see instead?\n\n```\n0\nserver log: payload too large\npayload too large\n1\n^C\n```\n","author":{"url":"https://github.com/misos1","@type":"Person","name":"misos1"},"datePublished":"2023-09-01T15:23:55Z","url":"https://github.com/nodejs/node/issues/49429"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:aec522d7-7097-3291-14af-90ff273c898c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E7FE:3C4A99:7D6CFC:A327BE:6AED3345 |
| html-safe-nonce | ef17ac76a61e29c74a336723ee3c22f3842438ca9945bfbd79bdd3fb7cf8deb3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFN0ZFOjNDNEE5OTo3RDZDRkM6QTMyN0JFOjZBRUQzMzQ1IiwidmlzaXRvcl9pZCI6IjIzOTYzMTc0NzIwNTU0NDAxOTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d1940101698c87a15f7895b254d359a36b6e2ada10dd4d6e8b35839ca2e06168 |
| hovercard-subject-tag | issue:1877621649 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/49429/issue_layout |
| twitter:image | https://opengraph.githubassets.com/43096680d6ef480d0b652e1f01d4ca8aea1a496fc39db50c9d3a2f67b0b05a40/nodejs/node/issues/49429 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/43096680d6ef480d0b652e1f01d4ca8aea1a496fc39db50c9d3a2f67b0b05a40/nodejs/node/issues/49429 |
| og:image:alt | Version v20.5.1 Platform Darwin Kernel Version 22.6.0 Subsystem http What steps will reproduce the bug? #38262 #38262 (comment) This often stops after the first iteration: let http = require("http"... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | misos1 |
| hostname | github.com |
| expected-hostname | github.com |
| None | e51d0b7b5ab34b1688c05b54c3ed17b8658b2fa9bca973a9c740683ccb12cf4a |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 59ebb7b901cc154ecc179a44f266fcf69f343b30 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width