next.js
5944fe4a - fix: pure node stream PPR resume path, avoid Readable.toWeb() interop

Commit
83 days ago
fix: pure node stream PPR resume path, avoid Readable.toWeb() interop Readable.toWeb() produces streams with Node-internal state that breaks when mixed with web TransformStreams during cancellation. Instead of bridging through web streams, construct the PPR resume response as a pure Node Readable chain: cached HTML (Readable.from) + sentinel + PassThrough bridge, joined via chainNodeStreams. The resume render pipes to the bridge via pipeToNodeWritable (node:stream/promises pipeline). Web TransformStream path kept for non-node-streams builds.
Author
Committer
Parents
Loading