Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

bug fixing on httpUtils::getHeader

  • Loading branch information...
commit ba95f105da3240cf3500e104951b6fcc8e5b90b6 1 parent d9b787a
Mirco Babini mircobabini authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 mashape/net/httpUtils.php
14 mashape/net/httpUtils.php
View
@@ -43,14 +43,14 @@ public static function isLocal() {
return $ip == "127.0.0.1" || $ip == "::1";
}
- public static function getHeader($name) {
+ public static function getHeader($name) {
$headers = apache_request_headers();
- foreach (array_keys($headers) as $header) {
- if ($header == $name) {
- return $headers[$header];
- }
- }
- }
+ foreach ($headers as $key => $value) {
+ if ($key == $name) {
+ return $value;
+ }
+ }
+ }
public static function makeHttpRequest($url) {
$response = @file_get_contents($url);
Please sign in to comment.
Something went wrong with that request. Please try again.