postman-app-support
postman-app-support copied to clipboard
Postman not sending the automatically generated Content-Type header
Is there an existing issue for this?
- [X] I have searched the tracker for existing similar issues and I know that duplicates will be closed
Describe the Issue
When attempting to send a multipart/form-data file, the auto-generated Content-Type header is not sent through to the server, however if I set one manually, it is.
Oddly, this worked just once, and then every request afterwards does not contain the auto-generated Content-Type.
Steps To Reproduce
- Set up a multipart request, do not populate
Content-Typekey/value. - Upload a file in form-data, making sure a new
Content-Typeheader is populated - Send request
A side effect of this, I can't seem to upload anymore files either. I saved the file to the team, if that causes issues.
Screenshots or Videos
Operating System
macOS
Postman Version
10.23.1-240213-0704
Postman Platform
Postman Web
User Account Type
Signed In User
Additional Context?
No response
Either has been fixed, or it was my fault. It's working now.
Reopening, as it's reappeared. I believe this is a Postman issue.
@lscown Hey, thanks for reaching out. Unfortunately I've not be able to replicate this. Can you help me out with a bit more info:
- Is this happening only on uploaded files or local file also?
- Does this happen for any specific file (large content?) or all files?
- Can you try sending the request to an echo endpoint like
https://postman-echo.com/postand see if the headers are getting sent correctly? - Are there any request settings that you're updated which might be causing this? I see the "Settings" tab seems to be modified in the screenshot that you shared.
- Any screen recording that you can share which might help debug this faster would be great as well.
Hi @coditva - it's incredibly sporadic how it occurs, it's currently replicated in my environment. Hopefully this is enough context, please let me know if you'd like anything else.
- After trying it - it works when it's a local file, but does not when it's a team uploaded file. FWIW this is an uploaded .webm video. However, it works for both in the desktop app (local + web). Not entirely sure that this is the issue, but when I switch between files, the local one works.
- I realise it's only occuring on the
.webmI uploaded. However, it has worked prior and sent through data. All other files seem to work, it's just the specific one that only sometimes works. - Just tried this - and my suspicions are correct, there's no
Content-Typeheader that is sent (see images) - The cookie jar was disabled, the default setting changes nothing
- (Screenshots) - my POST to
https://postman-echo.com/post:
I had the same issue today.
(Pdb) request.headers
{'Authorization': 'Bearer
If I add non-file variables to the body, the content-type is set.
Notice the Postman version in User-Agent also do not match.
This problem is also happening quite consistently with me. Usually works as usual in the first 10-20 minutes of request creation but after a while it starts to happen over and over again.
I had this exact issue after I duplicated a tab with the file references already set. The original tab was still working correctly but the duplicate tab did not. Once I deleted and re-added the file references, it worked as intended.
Same here, got the same issue after duplicating a request, and the fix was removing the file and then adding it back.
It is also happening after restarting Postman.