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

Bug #6610 "Connection refused" dies hard
Submitted: 2006-01-27 18:06 UTC
From: serendipity at garv dot in Assigned:
Status: Bogus Package: HTTP_Request
PHP Version: 4.4.1 OS: Linux
Roadmaps: (Not assigned)    
Subscription  
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:
MUST BE VALID
Solve the problem : 7 + 7 = ?

 
 [2006-01-27 18:06 UTC] serendipity at garv dot in
Description: ------------ Doing a HTTP_Request to a Host that replies with "Connection refused" makes PEAR die quite hard. The code below is a snippet from Serendipity, where this bug leads to a full stop of Serendipity. It dies with these messages: Connection refused Notice: Connection refused in /home/garvin/cvs/serendipity/trunk/bundled-libs/PEAR.php on line 848 Connection refused It would be nice, if this would not stop the whole process. :-) I hope that HTTP_Request is the right place to support this. I am not sure if it is a central PEAR.php or Net_Socket/URL problem. Test script: --------------- <?php require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; $options = array(); serendipity_plugin_api::hook_event('backend_http_request', $options, 'spartacus'); $req = &new HTTP_Request($url, $options); if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') { printf(PLUGIN_EVENT_SPARTACUS_FETCHERROR, $url); echo '<br />'; if (file_exists($target) && filesize($target) > 0) { $data = file_get_contents($target); printf(PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE, strlen($data), $target); echo '<br />'; } } else { // Fetch file $data = $req->getResponseBody(); } ?> Expected result: ---------------- I would expect the script to emit the notice, but still continue the logic flow. Actual result: -------------- Connection refused Notice: Connection refused in /home/garvin/cvs/serendipity/trunk/bundled-libs/PEAR.php on line 848 Connection refused

Comments

 [2006-02-26 17:45 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!