Deactivated headers are still sent with requests

When a request header is deactivated (unchecked) in the Postman GUI, it is still sent with the outgoing request. Deactivated headers should not be included in the request at all.

Steps to Reproduce

  1. Add any header to your request in Postman.

  2. Deactivate (uncheck) the header in the Headers tab.

  3. Add the following test script to your request:

    JavaScript

    pm.test("List all sent request headers", function () {
        let headers = pm.request.headers.toJSON();
        headers.forEach(function(header) {
            console.log(header.key + ": " + header.value);
        });
    });
    
    
  4. Send the request.

  5. Open the Postman Console and observe that the deactivated header still appears in the list of sent headers.

Expected Behavior
Deactivated headers should not be sent with the request or appear in the list of actual request headers.

Hey @rafalpolnicki :waving_hand:

This just looks like your logging all the headers from the request out to the console but you’re missing the `disabled` property which shows that it’s either true/false.

Do you have a request that is using a disabled header that you can share with us?

To test this, you can use the https://postman-echo.com/headers endpoint to return the headers from the request and you can also check the network call in the console, to see the headers used in the request and the response.