fixing bug with arrays in querystring

This commit is contained in:
thefosk
2013-04-16 01:14:32 -07:00
parent 4ef822d843
commit ac9ca32923
2 changed files with 26 additions and 16 deletions

View File

@@ -57,16 +57,17 @@ class HttpResponse {
private function get_headers_from_curl_response($headers)
{
foreach (explode("\r\n", $headers) as $i => $line) {
foreach (explode("\r\n", $headers) as $i => $line) {
if ($i !== 0) {
list ($key, $value) = explode(': ', $line);
if (!empty($key) && substr($key, 0, 4) != "HTTP") $result[$key] = $value;
}
if (!empty($key) && substr($key, 0, 4) != "HTTP") {
$result[$key] = $value;
} else {
list ($key, $value) = explode(': ', $line);
}
}
}
return $result;
return $result;
}
}
?>