Skip to content

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

Closed

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.

Activity

  1. self-assigned this
    on Feb 6, 2025
  2. added
    freq1: low
    on Feb 6, 2025
  3. added 2 commits that reference this issue on Feb 6, 2025
    a49ba94
    71fdb28
  4. added a commit that references this issue on Feb 6, 2025
    f5d9745
  5. added a commit that references this issue on Feb 6, 2025
    414736b
  6. angular-automatic-lock-bot commented on Mar 9, 2025

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  7. locked and limited conversation to collaborators on Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: @angular/ssrfreq1: lowseverity3: brokentype: bug/fix

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions