Description
Command
version
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
18.2.12
Description
After building the project and starting the server, navigating to a page that contains \r\n in the API response and reloading the page causes Angular to stop working. The browser console shows the following error:
GET http://localhost:4000/about net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK)
Minimal Reproduction
https://github.com/AnatoliiMazur/angular-19-bug
- Build the project and start the server
- Navigate to the page http://localhost:4000/about
- Reload the page

Exception or Error
The page should render correctly, and Angular should work without errors.
Your Environment
Angular CLI: 19.1.5
Node: 20.11.1
Package Manager: npm 10.2.4
OS: darwin arm64
Angular:
...
Package Version
------------------------------------------------------
@angular-devkit/architect 0.1901.5 (cli-only)
@angular-devkit/core 19.1.5 (cli-only)
@angular-devkit/schematics 19.1.5 (cli-only)
@schematics/angular 19.1.5 (cli-only)
Anything else relevant?
A minimal reproduction repository is available here.