joomla/joomla-platform — pull request #1022 by piotr-cz (2012-03-22 14:14:02+00:00)
Title: Throw an exception before invalid response is parsed by getResponse()

to test: JHttpFactory::getHttp()->head('http://blah')

Parsing invalid response (false, "") throws PHP errors as getResponse() assumes $content is consists headers and content.