Skip to content

Commit c0827ce

Browse files
Merge branch '5.4' into 6.0
* 5.4: [Messenger] Use :memory: for SQLite tests [Mailer] Stream timeout not detected due to checking only string result of function fgets don not set http_version instead of setting it to null [DependencyInjection] don't move locator tag for service subscriber Fix search scope when performing fallback mapping driver detection Fix the notification email theme for asynchronously dispatched emails Update the CI setup to use the new output file Update actions in the CI to move away from the deprecated runtime Use 6.3 for new features [HttpFoundation] Check IPv6 is valid before comparing it Run tests with UTC to avoid daylight saving time messing with assertions Bump Symfony version to 5.4.16 Update VERSION for 5.4.15 Update CHANGELOG for 5.4.15 Bump Symfony version to 4.4.49 Update VERSION for 4.4.48 Update CONTRIBUTORS for 4.4.48 Update CHANGELOG for 4.4.48 [DependencyInjection] Don't autoconfigure tag when it's already set with attributes
2 parents af84893 + 3a40180 commit c0827ce

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

HttplugClient.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,17 @@ private function sendPsr7Request(RequestInterface $request, bool $buffer = null)
254254
$body->seek(0);
255255
}
256256

257-
return $this->client->request($request->getMethod(), (string) $request->getUri(), [
257+
$options = [
258258
'headers' => $request->getHeaders(),
259259
'body' => $body->getContents(),
260-
'http_version' => '1.0' === $request->getProtocolVersion() ? '1.0' : null,
261260
'buffer' => $buffer,
262-
]);
261+
];
262+
263+
if ('1.0' === $request->getProtocolVersion()) {
264+
$options['http_version'] = '1.0';
265+
}
266+
267+
return $this->client->request($request->getMethod(), (string) $request->getUri(), $options);
263268
} catch (\InvalidArgumentException $e) {
264269
throw new RequestException($e->getMessage(), $request, $e);
265270
} catch (TransportExceptionInterface $e) {

Psr18Client.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,16 @@ public function sendRequest(RequestInterface $request): ResponseInterface
9191
$body->seek(0);
9292
}
9393

94-
$response = $this->client->request($request->getMethod(), (string) $request->getUri(), [
94+
$options = [
9595
'headers' => $request->getHeaders(),
9696
'body' => $body->getContents(),
97-
'http_version' => '1.0' === $request->getProtocolVersion() ? '1.0' : null,
98-
]);
97+
];
98+
99+
if ('1.0' === $request->getProtocolVersion()) {
100+
$options['http_version'] = '1.0';
101+
}
102+
103+
$response = $this->client->request($request->getMethod(), (string) $request->getUri(), $options);
99104

100105
$psrResponse = $this->responseFactory->createResponse($response->getStatusCode());
101106

0 commit comments

Comments
 (0)