[GH-ISSUE #5726] [bug]: Content-Type header is stripped from request when defined in both Headers and Body tabs #2234

Open
opened 2026-03-16 23:40:26 +03:00 by kerem · 0 comments
Owner

Originally created by @anish-devgit on GitHub (Dec 25, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5726

Is there an existing issue for this?

  • I have searched existing issues and this bug hasn't been reported yet

Platform

Web App

Browser

Chrome

Operating System

Windows

Bug Description

What happened?

When a user manually adds a Content-Type header in the Headers tab that conflicts with the Content-Type implied by the selected Body type (e.g., application/json), the application fails to send any Content-Type header to the server.

The request is sent silently without the header, which causes backend parsing failures (e.g., 400 Bad Request) on strict APIs that require a specific Content-Type.

Steps to reproduce

  1. Go to https://hoppscotch.io (No login required).
  2. Set the HTTP Method to POST.
  3. Enter the URL: https://httpbin.org/post (This is an echo endpoint to verify headers).
  4. In the Body tab, select application/json and enter valid JSON (e.g., {}).
  5. In the Headers tab, manually add a new header:
    • Key: Content-Type
    • Value: text/plain
  6. Click Send.
  7. Observe the Response Body panel.

What I expected is

The application should either:

  1. Prioritize the manual header in the "Headers" tab, OR
  2. Prioritize the "Body" type selection.

It should NOT strip the Content-Type header entirely.

Screenshots

Observed response from httpbin showing the missing header:

"headers": {
    "Accept": "*/*",
    "Content-Length": "2",
    "Host": "httpbin.org",
    "User-Agent": "Mozilla/5.0..."
    // "Content-Type" is missing entirely
}

### Deployment Type

Hoppscotch Cloud

### Version

_No response_
Originally created by @anish-devgit on GitHub (Dec 25, 2025). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5726 ### Is there an existing issue for this? - [x] I have searched existing issues and this bug hasn't been reported yet ### Platform Web App ### Browser Chrome ### Operating System Windows ### Bug Description ## What happened? When a user manually adds a `Content-Type` header in the **Headers** tab that conflicts with the `Content-Type` implied by the selected **Body** type (e.g., `application/json`), the application fails to send *any* `Content-Type` header to the server. The request is sent silently without the header, which causes backend parsing failures (e.g., 400 Bad Request) on strict APIs that require a specific Content-Type. ## Steps to reproduce 1. Go to https://hoppscotch.io (No login required). 2. Set the HTTP Method to `POST`. 3. Enter the URL: `https://httpbin.org/post` (This is an echo endpoint to verify headers). 4. In the **Body** tab, select `application/json` and enter valid JSON (e.g., `{}`). 5. In the **Headers** tab, manually add a new header: - Key: `Content-Type` - Value: `text/plain` 6. Click **Send**. 7. Observe the **Response Body** panel. ## What I expected is The application should either: 1. Prioritize the manual header in the "Headers" tab, OR 2. Prioritize the "Body" type selection. It should NOT strip the `Content-Type` header entirely. ## Screenshots Observed response from httpbin showing the missing header: ```json "headers": { "Accept": "*/*", "Content-Length": "2", "Host": "httpbin.org", "User-Agent": "Mozilla/5.0..." // "Content-Type" is missing entirely } ### Deployment Type Hoppscotch Cloud ### Version _No response_
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#2234
No description provided.