postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.85k stars 841 forks source link

Error 415 because charset=UTF-8 is added to application/octet-stream #13227

Open DaniWe opened 3 weeks ago

DaniWe commented 3 weeks ago

Is there an existing issue for this?

Describe the Issue

I'm trying to test an API and upload a file as application/octet-stream, but the server keeps responding with 415 UNSUPPORTED_MEDIA_TYPE: "Content-Type 'application/octet-stream;charset=UTF-8' is not supported"

I searched the forum and found this case: https://community.postman.com/t/adding-charset-into-content-type-application-octet-stream/53827 However, the solution (to switch off automatic headers), the setting does not seem to exist anymore in v11.18 and I cannot find any other related setting that will remove the implicitly force-added charset.

Steps To Reproduce

  1. Open a new request tab and input an URL to an endpoint that accepts application/octet-stream.
  2. Go to Body and select binary.
  3. Select a file (PDF in my case).
  4. Go to Headers and deselect the automatically added application/pdf.
  5. Add a new Content-Type: application/octet-stream
  6. Send request.
  7. Observe headers received on server: "Content-Type: application/octet-stream;charset=UTF-8"

Screenshots or Videos

No response

Operating System

Windows

Postman Version

11.18

Postman Platform

Postman App

User Account Type

Signed Out User

Additional Context?

No response