Skip to content

fix(@angular/build): quote weak ETags of assets served by the dev server - #34566

Merged
alan-agius4 merged 2 commits into
angular:mainfrom
MeAkib:fix/dev-server-asset-weak-etag
Oct 28, 2026
Merged

alan-agius4 merged 2 commits into
angular:mainfrom
MeAkib:fix/dev-server-asset-weak-etag

Conversation

@MeAkib

@MeAkib MeAkib commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Extensionless, JavaScript, TypeScript and stylesheet assets served by the dev server and the Vitest browser runner sent an unquoted weak ETag such as W/25a71cd345af2de4. RFC 9110 requires the entity tag to be quoted (W/"25a71cd345af2de4"), which is how the other ETags in the same middleware are already formatted.

Extensionless, JavaScript, TypeScript and stylesheet assets served by the dev server and the
Vitest browser runner sent an unquoted weak ETag such as `W/25a71cd345af2de4`. RFC 9110 requires
the entity tag to be quoted (`W/"25a71cd345af2de4"`), which is how the other ETags in the same
middleware are already formatted.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the weak ETag generation in the assets middleware to correctly wrap the calculated hash in double quotes, adhering to standard ETag formatting. It also adds a corresponding integration test to verify that extensionless assets are served with a valid weak ETag. There are no review comments, and I have no feedback to provide.

@alan-agius4 alan-agius4 added the target: patch This PR is targeted for the next patch release label Oct 28, 2026
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Oct 28, 2026
@angular-robot
angular-robot Bot requested a review from alan-agius4 October 28, 2026 14:01
@alan-agius4
alan-agius4 merged commit 0e2799d into angular:main Oct 28, 2026
39 checks passed
@alan-agius4

Copy link
Copy Markdown
Collaborator

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/build target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants