Improve no content handling in MockHttpServletRequest

Issue: SPR-11764