dunglas / react-esi

React ESI: Blazing-fast Server-Side Rendering for React and Next.js
https://dunglas.fr/2019/04/react-esi-blazing-fast-ssr/
MIT License
678 stars 30 forks source link

fix: content truncated because response end is called too early #22

Closed jamyouss closed 3 years ago

jamyouss commented 3 years ago

In some case the res.end is called too early. We should let the pipe end the writer when the reader ends.

Tested with large ESI. The transformation is working but the last part is not sent.

jamyouss commented 3 years ago

@dunglas why do we have the pipeStream on the options argument of the serveFragment ? What is the use case ?

jamyouss commented 3 years ago

ping @dunglas

jamyouss commented 3 years ago

ping @dunglas

dunglas commented 3 years ago

Thanks @jamyouss, sorry for the delay!

jamyouss commented 3 years ago

Thanks @jamyouss, sorry for the delay!

No problem. Happy new year :)

jamyouss commented 3 years ago

don't forget to release the fix when can please :) thanks,

florentbarriol commented 3 years ago

Hello @dunglas , Is it possible to release this fix ? It will be awesome :smiley: