Skip to content

Commit

Permalink
Merge pull request #189 from bc-AlyssNoland/deadlock-fixes
Browse files Browse the repository at this point in the history
Updated connection.php with Jasper Studios fixes to resolve deadlocking
  • Loading branch information
bookernath committed Dec 20, 2016
2 parents 71c6d49 + 36718d6 commit 70e4413
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Bigcommerce/Api/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ public function get($url, $query = false)

curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($this->curl, CURLOPT_URL, $url);
curl_setopt($this->curl, CURLOPT_POST, false);
curl_setopt($this->curl, CURLOPT_PUT, false);
curl_setopt($this->curl, CURLOPT_HTTPGET, true);
curl_exec($this->curl);

Expand Down Expand Up @@ -392,6 +394,8 @@ public function post($url, $body)
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($this->curl, CURLOPT_URL, $url);
curl_setopt($this->curl, CURLOPT_POST, true);
curl_setopt($this->curl, CURLOPT_PUT, false);
curl_setopt($this->curl, CURLOPT_HTTPGET, false);
curl_setopt($this->curl, CURLOPT_POSTFIELDS, $body);
curl_exec($this->curl);

Expand Down Expand Up @@ -444,6 +448,8 @@ public function put($url, $body)

curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($this->curl, CURLOPT_URL, $url);
curl_setopt($this->curl, CURLOPT_HTTPGET, false);
curl_setopt($this->curl, CURLOPT_POST, false);
curl_setopt($this->curl, CURLOPT_PUT, true);
curl_exec($this->curl);

Expand All @@ -463,6 +469,9 @@ public function delete($url)
{
$this->initializeRequest();

curl_setopt($this->curl, CURLOPT_PUT, false);
curl_setopt($this->curl, CURLOPT_HTTPGET, false);
curl_setopt($this->curl, CURLOPT_POST, false);
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($this->curl, CURLOPT_URL, $url);
curl_exec($this->curl);
Expand Down

0 comments on commit 70e4413

Please sign in to comment.