Skip to content

Commit

Permalink
Merge 82979ee into 69013f4
Browse files Browse the repository at this point in the history
  • Loading branch information
kelunik committed Nov 11, 2019
2 parents 69013f4 + 82979ee commit 6600d94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Connection/Http1Connection.php
Expand Up @@ -178,6 +178,8 @@ private function request(Request $request, CancellationToken $cancellation): Pro
$request = yield from $this->buildRequest($request);
$protocolVersion = $this->determineProtocolVersion($request);

$request->setProtocolVersions([$protocolVersion]);

if ($request->getTransferTimeout() > 0) {
$timeoutToken = new TimeoutCancellationToken($request->getTransferTimeout());
$combinedCancellation = new CombinedCancellationToken($cancellation, $timeoutToken);
Expand Down
2 changes: 2 additions & 0 deletions src/Connection/Http2Connection.php
Expand Up @@ -296,6 +296,8 @@ private function request(Request $request, CancellationToken $token): Promise
$request->removeHeader('connection');
$request->removeHeader('transfer-encoding');

$request->setProtocolVersions(['2']);

$id = $this->streamId += 2; // Client streams should be odd-numbered, starting at 1.

$this->streams[$id] = $stream = new Http2Stream(
Expand Down

0 comments on commit 6600d94

Please sign in to comment.