ZF-3548: Improper handling of no-body HTTP responses


Currently, Zend_Http_Client tries to read a response body even from a response that has no body (eg. 304, 204, no body-length header).

This mostly works but if keep-alive is enabled, it causes major slowdowns because the client tries to read until the connection is closed by the server. Additionally this causes requests with 304 etc. responses to always close (and never utilize keep-alive or persistent modes) - see ZF-3333 as well.


Both are symptoms of the same problem. Solving this one should also solve ZF-3333

Fixed in r. 9870. Does not break BC.

Updating for the 1.6.0 release.