Title: Reader of ReadStream.toWeb does not return `done: true` on readStream finish · Issue #44866 · nodejs/node · GitHub
Open Graph Title: Reader of ReadStream.toWeb does not return `done: true` on readStream finish · Issue #44866 · nodejs/node
X Title: Reader of ReadStream.toWeb does not return `done: true` on readStream finish · Issue #44866 · nodejs/node
Description: Version 18.9.0 Platform macOS Subsystem No response What steps will reproduce the bug? I've tried the .toWeb approach to convert ServerHttp2Stream to a web stream, but it seems that reader.read() never returns done: true on readable stre...
Open Graph Description: Version 18.9.0 Platform macOS Subsystem No response What steps will reproduce the bug? I've tried the .toWeb approach to convert ServerHttp2Stream to a web stream, but it seems that reader.read() n...
X Description: Version 18.9.0 Platform macOS Subsystem No response What steps will reproduce the bug? I've tried the .toWeb approach to convert ServerHttp2Stream to a web stream, but it seems that reader.read...
Opengraph URL: https://github.com/nodejs/node/issues/44866
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Reader of ReadStream.toWeb does not return `done: true` on readStream finish","articleBody":"### Version\n\n18.9.0\n\n### Platform\n\nmacOS\n\n### Subsystem\n\n_No response_\n\n### What steps will reproduce the bug?\n\nI've tried the `.toWeb` approach to convert ServerHttp2Stream to a web stream, but it seems that `reader.read()` never returns `done: true` on readable stream finish. ReadableState of ServerHttp2Stream says that readable is finished.\r\n\r\n```js\r\nimport { createSecureServer } from 'node:http2';\r\nimport { Duplex } from 'node:stream';\r\n\r\nconst options = {};\r\nconst sever = createSecureServer(options);\r\n\r\nserver.on('stream', (stream) =\u003e {\r\n const { readable, writable } = Duplex.toWeb(stream);\r\n \r\n const reader = readable.getReader();\r\n \r\n while (true) {\r\n const result = await reader.read();\r\n console.log(result); // { value: \"\u003cdata\u003e\", done: false }\r\n }\r\n});\r\n\r\nserver.listen(3000);\r\n```\n\n### How often does it reproduce? Is there a required condition?\n\n_No response_\n\n### What is the expected behavior?\n\nI expect to receive `done: true` after readable stream finish event.\n\n### What do you see instead?\n\nI receive `done: false`.\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/acomanescu","@type":"Person","name":"acomanescu"},"datePublished":"2022-10-02T20:47:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/44866/node/issues/44866"}
| 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:8f150f48-69f2-2985-07b0-015c66cf94dc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E0D0:3F9EED:667CE8:9785ED:6A4E120E |
| html-safe-nonce | 8564dc04830d7bad026823c9d376c093344fff061dec57a99359255dea83b08a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMEQwOjNGOUVFRDo2NjdDRTg6OTc4NUVEOjZBNEUxMjBFIiwidmlzaXRvcl9pZCI6Ijg4OTI1MjIxMjY0ODI3Mzk3MjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1e168807f4a0d579074a854d17fbd776a0b5ecfd55c39507f68a2e9a3668f6d0 |
| hovercard-subject-tag | issue:1393894095 |
| 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/44866/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3b321a2fb84f4777d3572d192dc5c451287027a0f2fb37af021496f446427260/nodejs/node/issues/44866 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3b321a2fb84f4777d3572d192dc5c451287027a0f2fb37af021496f446427260/nodejs/node/issues/44866 |
| og:image:alt | Version 18.9.0 Platform macOS Subsystem No response What steps will reproduce the bug? I've tried the .toWeb approach to convert ServerHttp2Stream to a web stream, but it seems that reader.read() n... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | acomanescu |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| 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 | ea9187571e3edc5f2780f750631138669441ca50 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width