title: PHP 7.0 / SOAP not closing connection with appropriate header
body: <p><strong>Expected result:</strong></p>
  
  <p>When receiving data from the SOAP server, the connection will terminate</p>
  
  <p><strong>Actual result:</strong></p>
  
  <p>When making SOAP calls the connection is left open all the way to <code>default_socket_timeout</code> max value before finally terminating. I've currently set it to 5 seconds just  to get reliable response times (which is still ridiculous)</p>
  
  <p><strong>PHP 7.0.30-0ubuntu0.16.04.1 (cli)</strong></p>
  
  <p>I'm sure a lot of this is redundant, but I just started throwing everything at the constructor just to see if something would stick.</p>
  
  <pre><code>$context = stream_context_create(
      array('http' =&gt;
          array(
              'protocol_version' =&gt; '1.1',
              'header'           =&gt; 'Connection: close'
          )
      )
  );
  
  $this-&gt;_soap_client = new SoapClient($host_uri . '/api/' . MagentoSoap::V1_SOAP . '/?wsdl', array(
      'cache_wsdl'     =&gt; WSDL_CACHE_DISK,
      'keep_alive'     =&gt; false,
      'stream_context' =&gt; $context,
      'trace'          =&gt; 1
  ));
  
  //HANGS HERE (and subsequent soap calls to php.ini's default_socket_timeout value)
  $this-&gt;_soap_session = $this-&gt;_soap_client-&gt;login($this-&gt;_config['magento_api_credentials']['username'], $this-&gt;_config['magento_api_credentials']['password']);
  </code></pre>
  
  <p>Example Request/Response headers:</p>
  
  <pre><code>HTTP/1.1 200 OK
  Date: Fri, 24 Aug 2018 15:53:41 GMT
  Content-Type: text/xml; charset=UTF-8
  Content-Length: 544
  Connection: close
  Set-Cookie: __cfduid=db509bea5b6140817d0ab01daef54d6141535126021; expires=Sat, 24-Aug-19 15:53:41 GMT; path=/; domain=.xxx.com; HttpOnly
  Set-Cookie: PHPSESSID=62c4ff56a5ccc17b26700129a19636e1; expires=Wed, 24-Aug-2118 21:10:21 GMT; Max-Age=3155692600; path=/; domain=www.xxx.com; secure; HttpOnly
  Expires: Thu, 19 Nov 1981 08:52:00 GMT
  Cache-Control: no-store, no-cache, must-revalidate
  Pragma: no-cache
  Strict-Transport-Security: max-age=31536000; includeSubDomains;
  X-UA-Compatible: IE=Edge
  X-Frame-Options: SAMEORIGIN
  X-Content-Type-Options: nosniff
  X-XSS-Protection: 1; mode=block
  Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
  Server: cloudflare
  CF-RAY: 44f6fe42ff88921e-EWR
  
  POST /index.php/api/soap/index/ HTTP/1.1
  Host: www.xxx.com
  Connection: close
  User-Agent: PHP-SOAP/7.0.30-0ubuntu0.16.04.1
  Content-Type: text/xml; charset=utf-8
  SOAPAction: "urn:Action"
  Content-Length: 642
  Cookie: __cfduid=d8a5d51205add299655b6ab5478d3b8e41535126399;PHPSESSID=a201c37d45c983ee121c3f5a4716b29f;
  </code></pre>
  
  <p>php.ini's soap values:</p>
  
  <pre><code>root@middleware-production:~/middleware# php -r 'phpinfo();' | grep soap
  /etc/php/7.0/cli/conf.d/20-soap.ini,
  soap
  soap.wsdl_cache =&gt; 1 =&gt; 1
  soap.wsdl_cache_dir =&gt; /tmp =&gt; /tmp
  soap.wsdl_cache_enabled =&gt; 1 =&gt; 1
  soap.wsdl_cache_limit =&gt; 5 =&gt; 5
  soap.wsdl_cache_ttl =&gt; 86400 =&gt; 86400
  </code></pre>