Fixes overriding of FakeRequest Content-Type header

The Content-Type in the request was being overridden by a mixed order merge.

Also rewrites the logic to be clearer and introduces some tests.

Fixes #3019.