I only rolled back the change locally -- I didn't submit a pull request, as I'm not sure what side effects my workaround might have. I suspect it may break some other use cases at the same time that it fixes mine (after all, I assume that the change that caused the problem was accepted for some valid reason in the first place).
I believe that Matthew mentioned a few days ago that he was working on a fix for this, so hopefully it will be sorted out soon. - Demian ________________________________________ From: cmple [roman.vidya...@gmail.com] Sent: Tuesday, January 08, 2013 5:22 PM To: fw-general@lists.zend.com Subject: [fw-general] RE: [ZF2 2.0.6] ReCaptcha is broken? @demiankatz, is this going into the next release? (2.0.7) demiankatz wrote > Did you see this open issue? > > https://github.com/zendframework/zf2/issues/3267 > > I was able to work around the problem by rolling back this commit: > > https://github.com/zendframework/zf2/commit/66f269f354636c5764a1ae78157347a639ae63f8#library/Zend/Http/Client/Adapter/Socket.php > > - Demian > >> -----Original Message----- >> From: cmple [mailto: > roman.vidyayev@ > ] >> Sent: Tuesday, January 08, 2013 1:29 PM >> To: > fw-general@.zend >> Subject: [fw-general] [ZF2 2.0.6] ReCaptcha is broken? >> >> Hi, >> >> I get the following error when submitting the form with ReCaptcha: >> >> File: >> >> >> /***/vendor/zendframework/zendframework/library/Zend/Http/Response.php:449 >> >> Message: >> >> *Error parsing body - doesn't seem to be a chunked message* >> >> Stack trace: >> >> #0 >> /***/vendor/zendframework/zendframework/library/Zend/Http/Response.php(303): >> Zend\Http\Response->decodeChunkedBody('false?'An inter...') >> #1 >> /***/vendor/zendframework/zendservice- >> recaptcha/library/ZendService/ReCaptcha/Response.php(133): >> Zend\Http\Response->getBody() >> #2 >> /***/vendor/zendframework/zendservice- >> recaptcha/library/ZendService/ReCaptcha/Response.php(61): >> ZendService\ReCaptcha\Response- >> >setFromHttpResponse(Object(Zend\Http\Response)) >> #3 >> /***/vendor/zendframework/zendservice- >> recaptcha/library/ZendService/ReCaptcha/ReCaptcha.php(496): >> ZendService\ReCaptcha\Response->__construct(NULL, NULL, >> Object(Zend\Http\Response)) >> #4 >> /***/vendor/zendframework/zendframework/library/Zend/Captcha/ReCaptcha.php(221 >> ): >> ZendService\ReCaptcha\ReCaptcha->verify('03AHJ_VuuGz_AWc...', 'sdf') >> #5 >> /***/vendor/zendframework/zendframework/library/Zend/Validator/ValidatorChain. >> php(175): >> Zend\Captcha\ReCaptcha->isValid(Array, Array) >> #6 >> /***/vendor/zendframework/zendframework/library/Zend/InputFilter/Input.php(285 >> ): >> Zend\Validator\ValidatorChain->isValid(Array, Array) >> #7 >> /***/vendor/zendframework/zendframework/library/Zend/InputFilter/BaseInputFilt >> er.php(195): >> Zend\InputFilter\Input->isValid(Array) >> #8 >> /***/vendor/zendframework/zendframework/library/Zend/Form/Form.php(441): >> Zend\InputFilter\BaseInputFilter->isValid() >> #9 >> /***/module/Application/src/Application/Controller/UserController.php(36): >> Zend\Form\Form->isValid() >> #10 >> /***/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractAc >> tionController.php(88): >> Application\Controller\UserController->loginAction() >> #11 [internal function]: >> Zend\Mvc\Controller\AbstractActionController- >> >onDispatch(Object(Zend\Mvc\MvcEvent)) >> #12 >> /***/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager >> .php(464): >> call_user_func(Array, Object(Zend\Mvc\MvcEvent)) >> #13 >> /***/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager >> .php(208): >> Zend\EventManager\EventManager->triggerListeners('dispatch', >> Object(Zend\Mvc\MvcEvent), Object(Closure)) >> #14 >> /***/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractCo >> ntroller.php(107): >> Zend\EventManager\EventManager->trigger('dispatch', >> Object(Zend\Mvc\MvcEvent), Object(Closure)) >> #15 >> /***/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php( >> 113): >> Zend\Mvc\Controller\AbstractController- >> >dispatch(Object(Zend\Http\PhpEnvironment\Request), >> Object(Zend\Http\PhpEnvironment\Response)) >> #16 [internal function]: >> Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent)) >> #17 >> /***/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager >> .php(464): >> call_user_func(Array, Object(Zend\Mvc\MvcEvent)) >> #18 >> /***/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager >> .php(208): >> Zend\EventManager\EventManager->triggerListeners('dispatch', >> Object(Zend\Mvc\MvcEvent), Object(Closure)) >> #19 >> /***/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php(297): >> Zend\EventManager\EventManager->trigger('dispatch', >> Object(Zend\Mvc\MvcEvent), Object(Closure)) >> #20 /***/public/index.php(12): Zend\Mvc\Application->run() >> #21 {main} >> >> >> >> >> I also found the following thread that attempts to fix a similar issue by >> changing the "decodeChunkedBody" method to: >> >> public static function decodeChunkedBody($body) >> { >> $decBody = ''; >> if (preg_match("/^([\da-fA-F]+)[^\r\n]*\r\n/sm", trim($body))) { >> while (preg_match("/^([\da-fA-F]+)[^\r\n]*\r\n/sm", trim($body), >> $m)) { >> $length = hexdec(trim($m[1])); >> $cut = strlen($m[0]); >> >> $decBody .= substr($body, $cut, $length); >> $body = substr($body, $cut + $length + 2); >> } >> } else { >> return $body; >> } >> >> return $decBody; >> } >> >> source: >> http://www.magentocommerce.com/boards/viewthread/9125/P15/#t148838 >> >> >> Any help would be greatly appreciated, >> Thanks! >> Roman. >> >> >> >> >> -- >> View this message in context: http://zend-framework- >> community.634137.n4.nabble.com/ZF2-2-0-6-ReCaptcha-is-broken-tp4658694.html >> Sent from the Zend Framework mailing list archive at Nabble.com. >> >> -- >> List: > fw-general@.zend >> Info: http://framework.zend.com/archives >> Unsubscribe: > fw-general-unsubscribe@.zend >> > > > -- > List: > fw-general@.zend > Info: http://framework.zend.com/archives > Unsubscribe: > fw-general-unsubscribe@.zend -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/ZF2-2-0-6-ReCaptcha-is-broken-tp4658694p4658699.html Sent from the Zend Framework mailing list archive at Nabble.com. -- List: fw-general@lists.zend.com Info: http://framework.zend.com/archives Unsubscribe: fw-general-unsubscr...@lists.zend.com -- List: fw-general@lists.zend.com Info: http://framework.zend.com/archives Unsubscribe: fw-general-unsubscr...@lists.zend.com