[PR #4112] [MERGED] fix: headers having different values with the same key are not shown #4667

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

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4112
Author: @AndrewBastin
Created: 6/6/2024
Status: Merged
Merged: 6/12/2024
Merged by: @nivedin

Base: patchHead: fix/set-cookie-multiple


📝 Commits (3)

  • 4a394ac feat: allow ability for multiple headers with the same key to be shown
  • 3b295f8 chore: remove extension inspector in selfhost-desktop
  • bb4b5d2 chore: cleanup

📊 Changes

5 files changed (+34 additions, -19 deletions)

View changed files

📝 packages/hoppscotch-common/src/components.d.ts (+6 -7)
📝 packages/hoppscotch-common/src/helpers/network.ts (+7 -8)
📝 packages/hoppscotch-common/src/services/interceptor.service.ts (+16 -0)
📝 packages/hoppscotch-selfhost-desktop/src/main.ts (+0 -4)
📝 packages/hoppscotch-selfhost-desktop/src/platform/interceptors/native.ts (+5 -0)

📄 Description

Closes HFE-472
Closes #3532

When multiple values are sent for the same header, the current behaviour only shows one value (due to us following Axios' Response schema in the interceptor level), this is especially used for the Set-Cookie header. This PR implements so multiple values for the same header are shown in the UI. This is currently only implemented for the Desktop App's Native Interceptor, but can be extended in the future for Proxy once that has support for this.

What's Changed

  • Added additional.multiHeaders field to Interceptor NetworkResponse type to store the multi header data if the interceptor supports it.
  • When converting a NetworkResponse to HoppRESTResponse, the additional.multiHeaders field is read if present and if so, its contents are selected instead of the AxiosResponse type's header definition.
  • Native Interceptor now sets the additional.multiHeader field for responses.
  • Removed unwanted Extension Inspector entry in selfhost-desktop as extension is not applicable to it.

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

🔄 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/4112 **Author:** [@AndrewBastin](https://github.com/AndrewBastin) **Created:** 6/6/2024 **Status:** ✅ Merged **Merged:** 6/12/2024 **Merged by:** [@nivedin](https://github.com/nivedin) **Base:** `patch` ← **Head:** `fix/set-cookie-multiple` --- ### 📝 Commits (3) - [`4a394ac`](https://github.com/hoppscotch/hoppscotch/commit/4a394ac22478e7cd1b2499e6f5f8c7aab57b4bf6) feat: allow ability for multiple headers with the same key to be shown - [`3b295f8`](https://github.com/hoppscotch/hoppscotch/commit/3b295f84a3524b5b9c503f93521b94e9f8c5646d) chore: remove extension inspector in selfhost-desktop - [`bb4b5d2`](https://github.com/hoppscotch/hoppscotch/commit/bb4b5d2c0357e64121e69390120ad6b875a0cf44) chore: cleanup ### 📊 Changes **5 files changed** (+34 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/src/components.d.ts` (+6 -7) 📝 `packages/hoppscotch-common/src/helpers/network.ts` (+7 -8) 📝 `packages/hoppscotch-common/src/services/interceptor.service.ts` (+16 -0) 📝 `packages/hoppscotch-selfhost-desktop/src/main.ts` (+0 -4) 📝 `packages/hoppscotch-selfhost-desktop/src/platform/interceptors/native.ts` (+5 -0) </details> ### 📄 Description Closes HFE-472 Closes #3532 When multiple values are sent for the same header, the current behaviour only shows one value (due to us following Axios' Response schema in the interceptor level), this is especially used for the `Set-Cookie` header. This PR implements so multiple values for the same header are shown in the UI. This is currently only implemented for the Desktop App's Native Interceptor, but can be extended in the future for Proxy once that has support for this. ### What's Changed - Added `additional.multiHeaders` field to Interceptor `NetworkResponse` type to store the multi header data if the interceptor supports it. - When converting a `NetworkResponse` to `HoppRESTResponse`, the `additional.multiHeaders` field is read if present and if so, its contents are selected instead of the AxiosResponse type's header definition. - Native Interceptor now sets the `additional.multiHeader` field for responses. - Removed unwanted Extension Inspector entry in `selfhost-desktop` as extension is not applicable to it. ### Checks - [x] My pull request adheres to the code style of this project - [ ] My code requires changes to the documentation - [ ] I have updated the documentation as required - [x] All the tests have passed --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:11:02 +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#4667
No description provided.