[WebProfiler] fix content-type parameter

Bc break: no

This fixes an error in #8050 that was raising a fatal error.
It also adds the typehint for consistency because the typehint is also present in ResponseHeaderBag where the param is passed through. This should help that such errors are more unlikely to happen.