webpack-hot-middleware
webpack-hot-middleware copied to clipboard
Fixed win10 cannot handle EventSource Response
This PR contains a:
- [x] bugfix
- [ ] new feature
- [ ] code refactor
- [ ] test update
- [ ] typo fix
- [ ] metadata update
Motivation / Use-Case
on Window 10, browsers would not process (or cannot handle) the EventSource's HTTP response if the response is without 'Content-Length'. It cause the client.js cannot be notified to update frontend changes.
But hot-middleware is using the streaming data approach to achieve eventsource. So, adding the Response Header 'Content-Length: -1' can solve the problem.
The fix is already tested on Chrome browser of window 10 (64 bit) and Mac OS.
https://github.com/webpack-contrib/webpack-hot-middleware/issues/101
Breaking Changes
Additional Info
Can you create minimum reproducible test repo, adding this header is breaking change and break logic for other types