[1.6.x] Fixed #20822 -- Set content type of default error pages to 'text/html'.

Thanks Jimmy Song for the patch.

Backport of 7843775 from master.