Fixes #6446 - Forbidding non-json POST/PUT requests in v2

## Tasks
- [x] Fix any broken tests
- [x] Write new tests
Ugh, I'll file a bug for that, thanks for spotting.  Would you mind doing this one?