Details
-
Type:
Patch
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.5.2
-
Fix Version/s: 1.6.0
-
Component/s: Zend_Http_Client
-
Labels:None
Description
Currently connection is closed always when '304 Not modified' response is sent by server.
This patch prevents connection closing when this response is sent (this happens for example
when If-Modified-Since header is used with request) and keep-alive is active.
This greatly speeds up checking if you have up-to-date files/data on servers
with keep-alive enabled.
Patch:
--- old/Socket.php 2008-02-16 12:58:39.000000000 +0200 +++ new/Socket.php 2008-05-26 11:06:34.000000000 +0300 @@ -285,6 +285,9 @@ $response .= $chunk; } + } elseif (Zend_Http_Response::extractCode($response) == 304) { + return $response; + // Fallback: just read the response (should not happen) } else { while ($buff = @fread($this->socket, 8192)) {
Issue Links
| This issue is related to: | ||||
| ZF-3548 | Improper handling of no-body HTTP responses |
|
|
|
Assigning. Shahar, if this change makes sense and is BC, can you please target it for 'Next Minor Release' with 'must have' priority?