[PR #4755] [CLOSED] fix: ensure duplicated headers are mapped to response #4920

Closed
opened 2026-03-17 02:24:40 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4755
Author: @thiagocavalcanti
Created: 2/14/2025
Status: Closed

Base: patchHead: fix/http-headers-duplicated


📝 Commits (1)

  • 3473520 fix: ensure duplicated headers are mapped to response

📊 Changes

1 file changed (+7 additions, -4 deletions)

View changed files

📝 packages/hoppscotch-common/src/helpers/network.ts (+7 -4)

📄 Description

Related to https://github.com/hoppscotch/hoppscotch/issues/3532#issuecomment-1983491480

When a NetworkResponse has multiple headers with the same key, the old code only retrieved the first header with that key. This is a classic scenario for the set-cookie header, where multiple cookies are often sent.

What's changed

  • Handle NetworkResponse.headers values as possible string[]

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/4755 **Author:** [@thiagocavalcanti](https://github.com/thiagocavalcanti) **Created:** 2/14/2025 **Status:** ❌ Closed **Base:** `patch` ← **Head:** `fix/http-headers-duplicated` --- ### 📝 Commits (1) - [`3473520`](https://github.com/hoppscotch/hoppscotch/commit/34735206d6cf4f4d61884ef0ebeaf5359cdfc9c5) fix: ensure duplicated headers are mapped to response ### 📊 Changes **1 file changed** (+7 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/src/helpers/network.ts` (+7 -4) </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> <!-- If this pull request closes an issue, please mention the issue number below --> Related to https://github.com/hoppscotch/hoppscotch/issues/3532#issuecomment-1983491480 When a NetworkResponse has multiple headers with the same key, the old code only retrieved the first header with that key. This is a classic scenario for the set-cookie header, where multiple cookies are often sent. <!-- Add an introduction into what this PR tries to solve in a couple of sentences --> ### What's changed <!-- Describe point by point the different things you have changed in this PR --> <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> - Handle NetworkResponse.headers values as possible string[] --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:24:40 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4920
No description provided.