Ensure responses are always application/json, even in error cases handled by webamchine.
Merge bug26437
stable to default