Skip to content

Commit

Permalink
bug fixing on httpUtils::getHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
mircobabini committed Feb 9, 2012
1 parent d9b787a commit ba95f10
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mashape/net/httpUtils.php
Expand Up @@ -43,14 +43,14 @@ public static function isLocal() {
return $ip == "127.0.0.1" || $ip == "::1"; return $ip == "127.0.0.1" || $ip == "::1";
} }


public static function getHeader($name) { public static function getHeader($name) {
$headers = apache_request_headers(); $headers = apache_request_headers();
foreach (array_keys($headers) as $header) { foreach ($headers as $key => $value) {
if ($header == $name) { if ($key == $name) {
return $headers[$header]; return $value;
} }
} }
} }


public static function makeHttpRequest($url) { public static function makeHttpRequest($url) {
$response = @file_get_contents($url); $response = @file_get_contents($url);
Expand Down

0 comments on commit ba95f10

Please sign in to comment.