Index: library/Zend/Http/Client/Adapter/Curl.php =================================================================== --- library/Zend/Http/Client/Adapter/Curl.php (revision 3993) +++ library/Zend/Http/Client/Adapter/Curl.php (working copy) @@ -351,8 +351,14 @@ // TODO: Probably the pattern for multiple handshake requests is always the same, several HTTP codes in the response. Use that information? // cURL automactically handles Expect: 100-continue; and its responses. Delete the HTTP 100 CONTINUE from a response // because it messes up Zend_Http_Response parsing - if (stripos($this->_response, "HTTP/1.1 100 Continue\r\n\r\n") !== false) { - $this->_response = str_ireplace("HTTP/1.1 100 Continue\r\n\r\n", '', $this->_response); + while (0 === stripos($this->_response, "HTTP/1.1 100 Continue\r\n")) { + $parts = preg_split('|(?:\r?\n){2}|m', $this->_response, 2); + + if (!isset($parts[1])) { + break; + } + + $this->_response = array_pop($parts); } // cURL automatically handles Proxy rewrites, remove the "HTTP/1.0 200 Connection established" string: