RickStrahl / Westwind.AspnetCore.LiveReload

ASP.NET Core Live Reload Middleware that monitors file changes in your project and automatically reloads the browser's active page
Other
473 stars 42 forks source link

Truncated responses? #9

Closed pm64 closed 5 years ago

pm64 commented 5 years ago

In general, LiveReload is phenomenal. But I'm seeing that in some cases, having LiveReload in the pipeline causes responses to get truncated, breaking the client. In these cases, the response is truncated even when LiveReloadEnabled=false. Removing LiveReload from the pipeline resolves the issue. Can this behavior be accounted for?

RickStrahl commented 5 years ago

Can you tell what fails exactly?

This was a big problem in the intial release but was updated more recently with a fix that re-writes the content length explicitly based on the actual size of the content.

I suspect what's happening is that somehow the content-length and the actual content size is not matching up. It would be good have an example of what fails to take a look at the exact respsonse that's getting returned/truncated.

Let me know if you can produce a repro sample.

pm64 commented 5 years ago

@RickStrahl - That explanation certainly sounds plausible, I'll do my best to get you a repro. I'm having difficulty pinpointing the issue but will continue investigating.

RickStrahl commented 5 years ago

Closing since we haven't heard back - feel free to reopen if you find a repro scenario that I can try.

samueldjack commented 5 years ago

I've just encountered the problem of truncated responses with version 0.1.5.2.

It only happens when I run the project from Visual Studio using the In-Process hosting model. If I switch to Out of Process nothing gets truncated, likewise using "dotnet watch run"