You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, I am doing a PUT with a large binary payload (and not setting content-type explicitly because nobody cares about it).
Some of the tests use a mock (moto), which in turn uses werkzeug and it will try to interpret the form data.. which is not parseable in this case...
I am not sure why we set Content-Type here at all, it does not seem to be required?
The text was updated successfully, but these errors were encountered:
Jmennius
changed the title
Setting Content-Type header without regard for the payload type causes issues
Setting Content-Type header without regard for the payload type causes issues
Aug 2, 2024
You are correct, the Content-Type header is not required. I'm not sure why it was originally included -- perhaps it was a convenience for some AWS service that might require it, but I can't recall which service anymore.
The requirement is this:
If the Content-Type header is present in the request, you must add it to the CanonicalHeaders list.
I'll add this to my todo to fix in the future. If you have the bandwidth, please submit a PR with this change.
For example, I am doing a PUT with a large binary payload (and not setting content-type explicitly because nobody cares about it).
Some of the tests use a mock (
moto
), which in turn useswerkzeug
and it will try to interpret the form data.. which is not parseable in this case...I am not sure why we set
Content-Type
here at all, it does not seem to be required?The text was updated successfully, but these errors were encountered: