This allows restoring optimization in StringHttpMessageConverter that was undone in 23162b for 6.0.x. Closes gh-31327