[php-blog-cvs] r1667 - trunk/plugins/serendipity_event_spamblock
A reliable, secure & extensible PHP blog | Not mainstream since 2002
Brought to you by:
garvinhicking,
jhermanns
From: garvinhicking at B. <gar...@ma...> - 2007-04-10 07:16:42
|
Author: garvinhicking Date: 2007-04-10 09:16:27 +0200 (Tue, 10 Apr 2007) New Revision: 1667 Modified: trunk/plugins/serendipity_event_spamblock/serendipity_event_spamblock.php Log: Use readTimeout HTTP::Request option to reduce timeout issues, by isotopp (http://blog.koehntopp.de/archives/1651-Trackback-spam-swamping-my-apache....html) Modified: trunk/plugins/serendipity_event_spamblock/serendipity_event_spamblock.php =================================================================== --- trunk/plugins/serendipity_event_spamblock/serendipity_event_spamblock.php 2007-04-05 09:33:48 UTC (rev 1666) +++ trunk/plugins/serendipity_event_spamblock/serendipity_event_spamblock.php 2007-04-10 07:16:27 UTC (rev 1667) @@ -39,7 +39,7 @@ 'smarty' => '2.6.7', 'php' => '4.1.0' )); - $propbag->add('version', '1.66'); + $propbag->add('version', '1.67'); $propbag->add('event_hooks', array( 'frontend_saveComment' => true, 'external_plugin' => true, @@ -444,7 +444,8 @@ 'http' => '1.1', 'timeout' => 20, 'allowRedirects' => true, - 'maxRedirects' => 3 + 'maxRedirects' => 3, + 'readTimeout' => array(5,0), ); $req = &new HTTP_Request( @@ -814,7 +815,7 @@ require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; if (function_exists('serendipity_request_start')) serendipity_request_start(); - $req = &new HTTP_Request($addData['url'], array('allowRedirects' => true, 'maxRedirects' => 5)); + $req = &new HTTP_Request($addData['url'], array('allowRedirects' => true, 'maxRedirects' => 5, 'readTimeout' => array(5,0))); $is_valid = false; if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') { $is_valid = false; |