Skip to content

Commit

Permalink
Do not set connection header if already set to allow custom action fr…
Browse files Browse the repository at this point in the history
…om user
  • Loading branch information
joelwurtz committed Jan 9, 2016
1 parent 29d2fac commit 7bc8b4f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ public function sendRequest(RequestInterface $request)
{
$remote = $this->config['remote_socket'];
$useSsl = $this->config['ssl'];
$request = $request->withHeader('Connection', 'close');

if (!$request->hasHeader('Connection')) {
$request = $request->withHeader('Connection', 'close');
}

if (null === $remote) {
$remote = $this->determineRemoteFromRequest($request);
Expand Down

0 comments on commit 7bc8b4f

Please sign in to comment.