Skip to content

Commit

Permalink
Merge pull request #245 from atensoftware/patch-2
Browse files Browse the repository at this point in the history
Fix getHeader to be case-insensitive
  • Loading branch information
lord2800 authored Jan 10, 2019
2 parents e6f8446 + 324f91a commit adcafe4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Bigcommerce/Api/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,12 @@ public function getHeader($header)
if (array_key_exists($header, $this->responseHeaders)) {
return $this->responseHeaders[$header];
}
// Do case-insensitive search
foreach ($this->responseHeaders as $k => $v) {
if (strtolower($k) == strtolower($header)) {
return $v;
}
}
}

/**
Expand Down

0 comments on commit adcafe4

Please sign in to comment.