Skip to content

Invalid content-type header when POSTing without a body #4913

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 of 5 tasks
andraz-kozelj opened this issue Jun 16, 2025 · 3 comments
Open
3 of 5 tasks

Invalid content-type header when POSTing without a body #4913

andraz-kozelj opened this issue Jun 16, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@andraz-kozelj
Copy link

I have checked the following:

  • I have searched existing issues and found nothing related to my issue.

This bug is:

  • making Bruno unusable for me
  • slowing me down but I'm able to continue working
  • annoying
  • this feature was working in a previous version but is broken in the current release.

Bruno version

2.4.0

Operating System

macOS 26 beta 1

Describe the bug

I have a POST request, with a single "Accept" header and no body.

When I sent it towards the server, server produced an error that the Content-Type header was "application/x-www-form-urlencoded" even though nobody set this header.

cURL code produced was correct:
curl --request POST \ --url 'http://localhost:8189/rest/v1/fhir/$reindex' \ --header 'accept: */*' \ --header 'authorization: Bearer {{authToken}}'

Timeline request DID NOT SHOW the "Content-Type" header.

Network logs showed the "undefined" as Content-Type value.

I did intercept the traffic and this was actually sent, where Content-Type header "Content-Type: application/x-www-form-urlencoded" is obviously added.

  • Seems that content displayed in timeline/network logs does not represent the actual content of the request
    and
  • no Content-Type header defined actually produces a header with an unwanted value.

.bru file to reproduce the bug

No response

Screenshots/Live demo link

I have a POST request, with a single header and no body.
Image
Image

When I sent it towards the server, server produced an error that the Content-Type header was "application/x-www-form-urlencoded" even though nobody set this header.

cURL code produced was correct:
curl --request POST \ --url 'http://localhost:8189/rest/v1/fhir/$reindex' \ --header 'accept: */*' \ --header 'authorization: Bearer {{authToken}}'

Timeline request DID NOT SHOW the "Content-Type" header:
Image

Network logs showed the "undefined" as Content-Type value:
Image

I did intercept the traffic and this was actually sent, where Content-Type header is obviously added:
Image

  • Seems that content displayed in timeline/network logs does not represent the actual content of the request
    and
  • no Content-Type header defined actually produces a header with an unwanted value.
@andraz-kozelj andraz-kozelj added the bug Something isn't working label Jun 16, 2025
@Its-treason
Copy link
Member

I had a slightly similar issue a few weeks ago: #4428

The Timeline seems to be inaccurate in other cases too.

@anusree-bruno
Copy link
Collaborator

Thanks for raising this issue. The second part — “no Content-Type header defined actually produces a header with an unwanted value” — is being tracked separately here: issue #2323.

@andraz-kozelj
Copy link
Author

Great.
I DID search the existing issues using keywords, but did not spot other linked issues. :(
Sorry for the hassle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants