Issues

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

Description

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

Comments

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.

Resolved in r. 11898

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

Changing issues in preparation for the 1.7.0 release.