Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.5.1

Bug #16149 Multiple requests through a single object errors
Submitted: 2009-04-24 23:27 UTC
From: jstump Assigned: avb
Status: Closed Package: HTTP_Request2 (version 0.3.0)
PHP Version: 5.2.9 OS: OS X
Roadmaps: 0.4.0    
Comments Add Comment Add patch

Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem : 41 - 25 = ?

 [2009-04-24 23:27 UTC] jstump (Joe Stump)
Description: ------------ I'm having trouble reproducing this, but if you run the unit test suite for my new Services_ShortURL package ( with the socket adapter I get malformed requests on expanding a TinyURL after a few requests. Switching to the curl adapter fixes it. I did some poking around, but couldn't track it down.


 [2009-05-03 02:37 UTC] avb (Alexey Borzov)
-Status: Open +Status: Verified
Thanks, running the tests (after removing hardcoded Curl adapter) indeed triggers that error. Looks like the problem is with persistent connection (Keep-Alive) to
 [2009-05-03 03:09 UTC] avb (Alexey Borzov)
-Status: Verified +Status: Analyzed
Looks like has a short keep-alive timeout, so while we are busy doing requests to other servers it closes the connection. And then Socket adapter tries to reuse the connected socket without bothering to check whether it is still connected. It then gets an empty string from disconnected socket triggering the "Malformed response" error. Hard to debug, indeed: doing requests to only will not trigger the error! :)
 [2009-05-03 17:18 UTC] avb (Alexey Borzov)
-Status: Analyzed +Status: Closed -Assigned To: +Assigned To: avb
Fixed in release 0.4.0