Skip to content

Commit

Permalink
Merge pull request #418 from jrchamp/fix/oauth-http2-error
Browse files Browse the repository at this point in the history
webservice: Use HTTP/1.1 to avoid HTTP/2 OAuth endpoint issue
  • Loading branch information
jrchamp authored Oct 20, 2022
2 parents 6c69f88 + 68ca5c7 commit 0bd41f3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions classes/webservice.php
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,11 @@ private function oauth($cache) {
$curl->setHeader('Authorization: Basic ' . base64_encode($this->clientid . ':' . $this->clientsecret));
$curl->setHeader('Content-Type: application/json');

// Force HTTP/1.1 to avoid HTTP/2 "stream not closed" issue.
$curl->setopt(array(
'CURLOPT_HTTP_VERSION' => CURL_HTTP_VERSION_1_1,
));

$timecalled = time();
$response = $this->make_curl_call($curl, 'post',
'https://zoom.us/oauth/token?grant_type=account_credentials&account_id=' . $this->accountid, array());
Expand Down

0 comments on commit 0bd41f3

Please sign in to comment.