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

Postman cannot read headers that start with "-" when importing from cURL #13262

Open thedamnatus opened 1 week ago

thedamnatus commented 1 week ago

Is there an existing issue for this?

Describe the Issue

When you use the "import from cURL string" function in Postman, and your request has headers in it that start with "-", for example "-Test-Header", Postman cannot read the string further and completely drops everything after the header, even the request body.

Example: 2024-11-13_tfBNLvsn3j 2024-11-13_6J94zzLnKs 2024-11-13_K6wiQqRAp8

Note that everything after "Test-Header1" is dropped, and the POST request turned into a GET request.

Steps To Reproduce

  1. Create a POST request with a body and several headers, one header name should start with "-"
  2. Export the request as cURL
  3. Import it as a new request

Screenshots or Videos

No response

Operating System

macOS

Postman Version

11.18.2

Postman Platform

Postman App

User Account Type

Signed In User

Additional Context?

No response