zendframework / zf1

This project reached its end-of-life on 2016-09-28. Contains conversion of ZF1 subversion repo to git, from version 15234 forward, and only containing master and release-1.12 branches and 1.12 tags.
https://framework.zend.com/blog/2016-06-28-zf1-eol.html
BSD 3-Clause "New" or "Revised" License
357 stars 801 forks source link

HTTP Content-Length header detected as invalid in 1.12.12 #570

Closed rokclimb15 closed 9 years ago

rokclimb15 commented 9 years ago

Any request that is POST or that has a body gets a content-length header added automatically. It is an integer returned by strlen to get a byte count. The additions in 1.12.12 reject values that are not string or object. Note that the header is set by Zend_Http_Client, not application code.

PHP Fatal error:  Uncaught exception 'Zend_Http_Exception' with message 'Invalid header value detected' in /usr/share/php/zend-framework-1.12.12/Zend/Http/Client.php:1597
Stack trace:
#0 /usr/share/php/zend-framework-1.12.12/Zend/Http/Client.php(467): Zend_Http_Client->_validateHeaderValue(14251)
#1 /usr/share/php/zend-framework-1.12.12/Zend/Http/Client.php(1358): Zend_Http_Client->setHeaders('Content-Length', 14251)
#2 /usr/share/php/zend-framework-1.12.12/Zend/Http/Client.php(1061): Zend_Http_Client->_prepareBody()
#3 /tmp/test.php(10): Zend_Http_Client->request()
froschdesign commented 9 years ago

Look at #567 and 1.12.13 is on the way: https://github.com/zendframework/zf1/releases