Skip to content

Angular 19 SSR: App breaks when receiving \r\n in API response with net::ERR_CONTENT_LENGTH_MISMATCH #29567

Closed
@AnatoliiMazur

Description

@AnatoliiMazur

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

  1. Build the project and start the server
  2. Navigate to the page http://localhost:4000/about
  3. Reload the page
Image

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.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions