silverstripe/silverstripe-framework — pull request #2674 by chillu (2013-11-18 15:05:12+00:00)
Title: FIX text/html type for Debug::friendlyError() in live mode

Avoid unparsed HTML responses in case of httpError(4xx) or httpError(5xx) in
live mode. The SS_HTTPResponse_Exception constructor automatically set
"text/plain" a content type, which conflicts with the later choice of
Debug::friendlyError() to return HTML.

This is a hotfix, needs more work to properly separate logic flow from
presentation concerns (e.g. through request processors).