Skip to content

Commit

Permalink
MDL-49669 badges: Handle curl redirects when posting to backpack
Browse files Browse the repository at this point in the history
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
  • Loading branch information
Yuliya Bozhko committed Mar 26, 2015
1 parent 20d3883 commit 734627a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions badges/lib/backpacklib.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,14 @@ public function curl_request($action, $collection = null) {
break;
}

$curl->setHeader(array('Accept: application/json', 'Expect:'));
$options = array(
'FRESH_CONNECT' => true,
'RETURNTRANSFER' => true,
'FORBID_REUSE' => true,
'HEADER' => 0,
'HTTPHEADER' => array('Expect:'),
'CONNECTTIMEOUT' => 3,
'FRESH_CONNECT' => true,
'RETURNTRANSFER' => true,
'FORBID_REUSE' => true,
'HEADER' => 0,
'CONNECTTIMEOUT' => 3,
'CURLOPT_POSTREDIR' => 3
);

if ($action == 'user') {
Expand Down

0 comments on commit 734627a

Please sign in to comment.