4 days ago, I started to received a strange error from a specific type of users on my backend.
After looking at the information given by Sentry, I noticed a strange behaviour for users with the same browser: (the other 1% is me reproducing and confirming the issue with Postman)
The error happens on an HTML form page, on the POST request after submitting the form.
The expected behaviour is a POST request with Content-Type: application/x-www-form-urlencoded
, but here it is Content-Type: application/json
(reported by Sentry, and confirmed with Postman), which is unexpected for a form on an HTML page.
That’s why my server is reporting an error, because it was not made to handle json to decode a html form. So I want to understand why this behaviour happens. And if this is new, I might not be the only one encountering issues with this.
Is there any new standard using json for html forms? Why are people using Chrome on Windows suddenly submitting form as a json POST request instead of form url encoded?