sebastienros / fluid

Fluid is an open-source .NET template engine based on the Liquid template language.
MIT License
1.35k stars 172 forks source link

FluidViewRenderer.RenderViewAsync writes to stream syncronously in some situations #647

Closed AlexGirardDev closed 1 month ago

AlexGirardDev commented 2 months ago

Hey,

I have been running into an issue when trying to use RenderViewAsync to write to an HTTP Response Body output stream.

It seems like RenderViewAsync writes to the stream passed in Syncronously in some situations which causes issues with Kestral unless you set this flag

I have created some unit tests reproducing the bugs in this branch

I was also able to produce this bug in the MVC sample in this branch

Some things i have noticed with this bug:

sebastienros commented 2 months ago

Can you create a PR with the test that FAILS in your branch? thanks

sebastienros commented 2 months ago

Maybe related to https://github.com/sebastienros/fluid/pull/601

AlexGirardDev commented 2 months ago

648