|
@@ -487,8 +487,8 @@ class Zend_Http_Response
|
|
|
/**
|
|
/**
|
|
|
* Extract the headers from a response string
|
|
* Extract the headers from a response string
|
|
|
*
|
|
*
|
|
|
- * @param string $response_str
|
|
|
|
|
- * @return array
|
|
|
|
|
|
|
+ * @param string $response_str
|
|
|
|
|
+ * @return array
|
|
|
*/
|
|
*/
|
|
|
public static function extractHeaders($response_str)
|
|
public static function extractHeaders($response_str)
|
|
|
{
|
|
{
|
|
@@ -507,7 +507,8 @@ class Zend_Http_Response
|
|
|
$line = trim($line, "\r\n");
|
|
$line = trim($line, "\r\n");
|
|
|
if ($line == "") break;
|
|
if ($line == "") break;
|
|
|
|
|
|
|
|
- if (preg_match("|^([\w-]+):\s+(.+)|", $line, $m)) {
|
|
|
|
|
|
|
+ // Locate headers like 'Location: ...' and 'Location:...' (note the missing space)
|
|
|
|
|
+ if (preg_match("|^([\w-]+):\s*(.+)|", $line, $m)) {
|
|
|
unset($last_header);
|
|
unset($last_header);
|
|
|
$h_name = strtolower($m[1]);
|
|
$h_name = strtolower($m[1]);
|
|
|
$h_value = $m[2];
|
|
$h_value = $m[2];
|