[PR #5025] [MERGED] fix(relay): better matching for content-type detection #5024

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

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/5025
Author: @CuriousCorrelation
Created: 4/27/2025
Status: Merged
Merged: 4/29/2025
Merged by: @AndrewBastin

Base: nextHead: feat-spec-compliant-content-type-extraction


📝 Commits (3)

  • d12ebf1 fix(kernel): better matching for content-type detection
  • d0de03f chore(agent): bump version to 0.1.10
  • 90cbc5f fix(desktop): consolidate app handle usage

📊 Changes

10 files changed (+72 additions, -68 deletions)

View changed files

📝 packages/hoppscotch-agent/package.json (+1 -1)
📝 packages/hoppscotch-agent/src-tauri/Cargo.lock (+2 -2)
📝 packages/hoppscotch-agent/src-tauri/Cargo.toml (+1 -1)
📝 packages/hoppscotch-agent/src-tauri/tauri.conf.json (+1 -1)
📝 packages/hoppscotch-agent/src-tauri/tauri.portable.conf.json (+1 -1)
📝 packages/hoppscotch-desktop/plugin-workspace/relay/src/response.rs (+27 -17)
📝 packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/Cargo.lock (+1 -1)
📝 packages/hoppscotch-desktop/src-tauri/Cargo.lock (+2 -2)
📝 packages/hoppscotch-desktop/src-tauri/src/lib.rs (+32 -38)
📝 pnpm-lock.yaml (+4 -4)

📄 Description

This PR addresses an issue where headers with different capitalizations were not being matched during Content-Type detection due to HTTP/2.0 middlewares (like Istio's) normalizing headers to lowercase according to RFC 7540.

Closes HFE-832

Notes to reviewers

The new method iterates over all headers with headers.iter() and then converts header keys to lowercase before comparison. Also fixes log guard ordering, to capture plugin init logs and prevent server from dropping early.


🔄 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/5025 **Author:** [@CuriousCorrelation](https://github.com/CuriousCorrelation) **Created:** 4/27/2025 **Status:** ✅ Merged **Merged:** 4/29/2025 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `next` ← **Head:** `feat-spec-compliant-content-type-extraction` --- ### 📝 Commits (3) - [`d12ebf1`](https://github.com/hoppscotch/hoppscotch/commit/d12ebf12c3c94c4e6d68374ca2b9082cc0a67712) fix(kernel): better matching for `content-type` detection - [`d0de03f`](https://github.com/hoppscotch/hoppscotch/commit/d0de03f7d2c0ea9cf7a2fa51c3e7c44564319206) chore(agent): bump version to `0.1.10` - [`90cbc5f`](https://github.com/hoppscotch/hoppscotch/commit/90cbc5f8a8e168d1272e2382410a4f2226032ab8) fix(desktop): consolidate app handle usage ### 📊 Changes **10 files changed** (+72 additions, -68 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-agent/package.json` (+1 -1) 📝 `packages/hoppscotch-agent/src-tauri/Cargo.lock` (+2 -2) 📝 `packages/hoppscotch-agent/src-tauri/Cargo.toml` (+1 -1) 📝 `packages/hoppscotch-agent/src-tauri/tauri.conf.json` (+1 -1) 📝 `packages/hoppscotch-agent/src-tauri/tauri.portable.conf.json` (+1 -1) 📝 `packages/hoppscotch-desktop/plugin-workspace/relay/src/response.rs` (+27 -17) 📝 `packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/Cargo.lock` (+1 -1) 📝 `packages/hoppscotch-desktop/src-tauri/Cargo.lock` (+2 -2) 📝 `packages/hoppscotch-desktop/src-tauri/src/lib.rs` (+32 -38) 📝 `pnpm-lock.yaml` (+4 -4) </details> ### 📄 Description This PR addresses an issue where headers with different capitalizations were not being matched during `Content-Type` detection due to HTTP/2.0 middlewares (like Istio's) normalizing headers to lowercase according to RFC 7540. Closes HFE-832 #### Notes to reviewers The new method iterates over all headers with `headers.iter()` and then converts header keys to lowercase before comparison. Also fixes log guard ordering, to capture plugin init logs and prevent server from dropping early. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:30:34 +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#5024
No description provided.