Skip to content

Commit b8376a7

Browse files
committed
Not support for persistent connection
Force a connection close to be compliant with HTTP 1.1 (socket client does not support persistent connection at the moment)
1 parent b808928 commit b8376a7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/SocketHttpClient.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ public function __construct(MessageFactory $messageFactory, array $config = [])
4747
*/
4848
public function sendRequest(RequestInterface $request)
4949
{
50-
$remote = $this->config['remote_socket'];
51-
$useSsl = $this->config['ssl'];
50+
$remote = $this->config['remote_socket'];
51+
$useSsl = $this->config['ssl'];
52+
$request = $request->withHeader('Connection', 'close');
5253

5354
if (null === $remote) {
5455
$remote = $this->determineRemoteFromRequest($request);

0 commit comments

Comments
 (0)