ZF-4574: Connection not properly closed if server sends both "Connection: close" and "Content-length" response headers

Issue Type: Bug Created: 2008-10-12T05:47:19.000+0000 Last Updated: 2008-11-13T14:10:18.000+0000 Status: Resolved Fix version(s): - 1.7.0 (17/Nov/08)

Reporter: Shahar Evron (shahar) Assignee: Shahar Evron (shahar) Tags: - Zend_Http_Client

Related issues: Attachments:


Unittests fail on the Zend_Http_Client Suite:

The socket patches from today and yesterday seem to have broken the Unittests for Persistence and Keep Alive: SocketKeepaliveTest, SocketPersistentTest.

This is my PHPUnit output:

  1. testHttpAuthBasic(Zend_Http_Client_SocketKeepaliveTest) Zend_Http_Client_Exception: Unable to read response, or response is empty /var/www/workspace/zfcomplete/trunk/tests/Zend/Http/Client/SocketTest.php:533

  2. testHttpAuthBasic(Zend_Http_Client_SocketPersistentTest) Zend_Http_Client_Exception: Unable to read response, or response is empty /var/www/workspace/zfcomplete/trunk/tests/Zend/Http/Client/SocketTest.php:533


Posted by Shahar Evron (shahar) on 2008-10-12T05:49:53.000+0000

There are two issues here, probably not related:

  1. The client no longer sends the "Connection: keep-alive" header to the server as required. Will open a separate bug about this later
  2. The client does not close the connection because it wrongly assumes that the server will close the connection at EOF. This will be fixed when I close this bug.

Posted by Shahar Evron (shahar) on 2008-10-12T05:53:23.000+0000

Resolved in r. 11898

Posted by Shahar Evron (shahar) on 2008-10-12T06:30:21.000+0000

Well it looks like issue #1 is not an issue after all, as we are not supposed to explicitly send keep-alive - only "close".

Posted by Wil Sinclair (wil) on 2008-11-13T14:10:18.000+0000

Changing issues in preparation for the 1.7.0 release.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.