Skip to content

fix: preserve status and statusText when cloning a Response with liveheaders#363

Merged
yusukebe merged 1 commit into
mainfrom
fix-preserve-response-status-statustext
Jun 22, 2026
Merged

fix: preserve status and statusText when cloning a Response with liveheaders#363
yusukebe merged 1 commit into
mainfrom
fix-preserve-response-status-statustext

Conversation

@usualoma

Copy link
Copy Markdown
Member

fixes #362

The lightweight Response built its GlobalResponse via { ...this.#init }, but #init may hold a Response instance whose status/statusText are prototype getters and are lost when spread. Read those fields explicitly so they survive alongside the live headers.

… headers

The lightweight Response built its GlobalResponse via `{ ...this.#init }`,
but `#init` may hold a Response instance whose `status`/`statusText` are
prototype getters and are lost when spread. Read those fields explicitly so
they survive alongside the live headers.
@usualoma

Copy link
Copy Markdown
Member Author

Hi @yusukebe,
Could you review it?

@yusukebe yusukebe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@yusukebe

Copy link
Copy Markdown
Member

@usualoma

Indeed, this should be fixed. Thank you!

@yusukebe yusukebe merged commit 814720f into main Jun 22, 2026
5 checks passed
@yusukebe yusukebe deleted the fix-preserve-response-status-statustext branch June 22, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: lightweight Response materialization changes status from 302 to 200

2 participants