[PR #4172] [MERGED] fix: fix issue for multipart/form-data and cookie header (#4162) #4689

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

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4172
Author: @shipko
Created: 7/6/2024
Status: Merged
Merged: 7/22/2024
Merged by: @AndrewBastin

Base: patchHead: fix-multipart-formdata


📝 Commits (7)

  • ed3d5ab fix(multipart-formdata): fix type for data variable
  • 697a5ff fix(multipart-formdata): fix parameter filter for unsetted file
  • a1ae732 fix(multipart-formdata): add mime type for sending file
  • 30df5a5 fix(multipart-formdata): add application/octet-stream by default mimetype
  • ec86400 fix(multipart-formdata): remove content-type: multipart/form-data header
  • 09802d8 fix(multipart-formdata): remove cookie cookie header if not present
  • ac21e68 fix(multipart-formdata): fix content-type filter

📊 Changes

3 files changed (+24 additions, -9 deletions)

View changed files

📝 packages/hoppscotch-common/src/helpers/utils/EffectiveURL.ts (+7 -1)
📝 packages/hoppscotch-selfhost-desktop/src-tauri/src/interceptor.rs (+4 -2)
📝 packages/hoppscotch-selfhost-desktop/src/platform/interceptors/native/index.ts (+13 -6)

📄 Description

Closes #4162

What's changed

This PR is fixing some issues on sending file data:

  1. Fix data variable type that sending to interceptor.rs
  2. Fix parameter filter for unsetted file
  3. Add mime type for sending file
  4. Fix double Content-Type header
  5. Fix Cookie header. Removing it if not present

Notes to reviewers

This PR is tested on web and desktop app. Not for CLI


🔄 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/4172 **Author:** [@shipko](https://github.com/shipko) **Created:** 7/6/2024 **Status:** ✅ Merged **Merged:** 7/22/2024 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `patch` ← **Head:** `fix-multipart-formdata` --- ### 📝 Commits (7) - [`ed3d5ab`](https://github.com/hoppscotch/hoppscotch/commit/ed3d5ab4f746a9c54be02fd4fe6511555ed9a37e) fix(multipart-formdata): fix type for data variable - [`697a5ff`](https://github.com/hoppscotch/hoppscotch/commit/697a5ff0ac39a905c54b32397f892b42611d120d) fix(multipart-formdata): fix parameter filter for unsetted file - [`a1ae732`](https://github.com/hoppscotch/hoppscotch/commit/a1ae73249ed73911cc523ef73593c4be86951341) fix(multipart-formdata): add mime type for sending file - [`30df5a5`](https://github.com/hoppscotch/hoppscotch/commit/30df5a5604d829d4c09401798a0e6e839af057d7) fix(multipart-formdata): add application/octet-stream by default mimetype - [`ec86400`](https://github.com/hoppscotch/hoppscotch/commit/ec864000041b24d1cef02ab08638fb0fc1250c0e) fix(multipart-formdata): remove content-type: multipart/form-data header - [`09802d8`](https://github.com/hoppscotch/hoppscotch/commit/09802d8a8be5ceff47500e32c4b8c82aa27de3d1) fix(multipart-formdata): remove cookie cookie header if not present - [`ac21e68`](https://github.com/hoppscotch/hoppscotch/commit/ac21e68671c2b50cb2171fc75a0092f988f2dddc) fix(multipart-formdata): fix content-type filter ### 📊 Changes **3 files changed** (+24 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/src/helpers/utils/EffectiveURL.ts` (+7 -1) 📝 `packages/hoppscotch-selfhost-desktop/src-tauri/src/interceptor.rs` (+4 -2) 📝 `packages/hoppscotch-selfhost-desktop/src/platform/interceptors/native/index.ts` (+13 -6) </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 --> Closes #4162 <!-- Add an introduction into what this PR tries to solve in a couple of sentences --> ### What's changed This PR is fixing some issues on sending file data: 1. Fix data variable type that sending to interceptor.rs 2. Fix parameter filter for unsetted file 3. Add mime type for sending file 4. Fix double Content-Type header 5. Fix Cookie header. Removing it if not present <!-- 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 --> ### Notes to reviewers <!-- Any information you feel the reviewer should know about when reviewing your PR --> This PR is tested on web and desktop app. Not for CLI --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:12:07 +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#4689
No description provided.