diff options
author | mattab <matthieu.aubry@gmail.com> | 2015-06-23 05:35:47 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2015-06-23 05:35:47 +0300 |
commit | 57e3d82885411dea5a6351cc973cfcd48006bffd (patch) | |
tree | 7fae53588c3c164569470debd6f5a101578e02cd /core/Http.php | |
parent | a4d75006efe2f82d0715d965d6dd9b7422e11476 (diff) |
Fixes #8159 no notice when the response only has headers and no body
Diffstat (limited to 'core/Http.php')
-rw-r--r-- | core/Http.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/Http.php b/core/Http.php index 91956c9f29..e14cd952aa 100644 --- a/core/Http.php +++ b/core/Http.php @@ -548,7 +548,14 @@ class Http // redirects are included in the output html, so we look for the last line that starts w/ HTTP/... // to split the response while (substr($response, 0, 5) == "HTTP/") { - list($header, $response) = explode("\r\n\r\n", $response, 2); + $split = explode("\r\n\r\n", $response, 2); + + if(count($split) == 2) { + list($header, $response) = $split; + } else { + $response = ''; + $header = $split; + } } foreach (explode("\r\n", $header) as $line) { |