Skip to content

Commit 3a40180

Browse files
Merge branch '4.4' into 5.4
* 4.4: [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 the notification email theme for asynchronously dispatched emails 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 4.4.49 Update VERSION for 4.4.48 Update CONTRIBUTORS for 4.4.48 Update CHANGELOG for 4.4.48
2 parents 8f29b0f + 0185497 commit 3a40180

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
@@ -256,12 +256,17 @@ private function sendPsr7Request(RequestInterface $request, bool $buffer = null)
256256
$body->seek(0);
257257
}
258258

259-
return $this->client->request($request->getMethod(), (string) $request->getUri(), [
259+
$options = [
260260
'headers' => $request->getHeaders(),
261261
'body' => $body->getContents(),
262-
'http_version' => '1.0' === $request->getProtocolVersion() ? '1.0' : null,
263262
'buffer' => $buffer,
264-
]);
263+
];
264+
265+
if ('1.0' === $request->getProtocolVersion()) {
266+
$options['http_version'] = '1.0';
267+
}
268+
269+
return $this->client->request($request->getMethod(), (string) $request->getUri(), $options);
265270
} catch (\InvalidArgumentException $e) {
266271
throw new RequestException($e->getMessage(), $request, $e);
267272
} 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)