Http Response Headers Processing bug fix

Header was not exploded correctly after multiple redirects.

    [0] => Server: nginx/1.0.15
    [1] => Date: Thu, 07 Nov 2013 08:52:25 GMT
    [2] => Content-Type: text/html
    [3] => Content-Length: 185
    [4] => Connection: keep-alive
    [5] => Location: http://*
    [6] => 
    [7] => HTTP/1.1 200 OK
    [8] => Server: nginx/1.0.15
    [9] => Content-Type: text/html
    ......

Should be:
[0] => Server: nginx/1.0.15
    [1] => Content-Type: text/html
    [2] => Transfer-Encoding: chunked
    [3] => Connection: keep-alive
    [4] => Vary: Accept-Encoding
.....
main
Telford-Rowley 11 years ago
parent 10991bb9f3
commit 1a9d432f0c

@ -130,7 +130,9 @@ class Wappalyzer
$result->html = mb_check_encoding($result->html, 'UTF-8') ? $result->html : utf8_encode($result->html); $result->html = mb_check_encoding($result->html, 'UTF-8') ? $result->html : utf8_encode($result->html);
$lines = array_slice(explode("\r\n", trim(substr($response, 0, $headerSize))), 1); $headers = trim(substr($response, 0, $headerSize));
$headers = end(preg_split('/^\s*$/m', $headers));
$lines = array_slice(explode("\r\n", $headers), 1);
foreach ( $lines as $line ) { foreach ( $lines as $line ) {
if ( strpos(trim($line), ': ') !== false ) { if ( strpos(trim($line), ': ') !== false ) {