ZF-7382: Zend_Http_Client_Adapter_Curl doesn't detect Transfer-Encoding: chunked properly
The HTTP/1.1 Spec states that messages header field values may be preceded by any amount of LWS ( http://w3.org/Protocols/rfc2616/… ). The Curl adapter checks if a message is chunked by doing a string position check for "Transfer-Encoding: chunked\r\n", which will not detect valid headers with excess whitespace like "Transfer-Encoding: chunked\r\n". If this check succeeds, it removes the header as Curl automatically handles chunked messages.
This results in the Zend_Http_Response trying to decode the message as if it were chunked and throwing an error that the message doesn't appear to be chunked.