Skip to content

Commit 52b5bd6

Browse files
authored
Merge pull request #239 from aik099/force-http-11-protocol
Use HTTP 1.1 protocol in ClientInterface implementing classes
2 parents 3dfe393 + ea7f1dd commit 52b5bd6

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1313
...
1414

1515
### Fixed
16-
...
16+
- The `CurlClient` in combination with cURL version < 7.33.0 was getting `426 Upgrade Required` error on any request to the Atlassian Cloud servers by [@aik099] (#239).
17+
- The `PHPClient` on PHP < 8.0 was getting `426 Upgrade Required` error on any request to the Atlassian Cloud servers by [@aik099] (#239).
1718

1819
## [2.0.0-B1] - 2025-01-04
1920
### Added

src/Jira/Api/Client/CurlClient.php

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ public function sendRequest(
9393
curl_setopt($curl, CURLOPT_USERPWD, sprintf('%s:%s', $credential->getId(), $credential->getPassword()));
9494
}
9595

96+
curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
9697
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
9798
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
9899
curl_setopt($curl, CURLOPT_VERBOSE, $debug);

src/Jira/Api/Client/PHPClient.php

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ public function sendRequest(
123123
'method' => $method,
124124
'header' => implode("\r\n", $header),
125125
'ignore_errors' => true,
126+
'protocol_version' => 1.1, // Not needed since PHP 8.0.
126127
),
127128
);
128129

0 commit comments

Comments
 (0)