[wp-trac] [WordPress Trac] #11468: Most HTTP transport methods in WP_Http process floats as integers for their respective timeout options.
WordPress Trac
wp-trac at lists.automattic.com
Thu Dec 17 03:11:15 UTC 2009
#11468: Most HTTP transport methods in WP_Http process floats as integers for their
respective timeout options.
--------------------------+-------------------------------------------------
Reporter: mdawaffe | Owner: dd32
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.9
Component: HTTP | Version: 2.9
Severity: major | Keywords: has-patch needs-testing
--------------------------+-------------------------------------------------
WP_Http_Curl::
http://us2.php.net/curl_setopt
Problem: CURLOPT_TIMEOUT, CURLOPT_CONNECTTIMEOUT.
Fix: Use CURLOPT_TIMEOUT_MS, CURLOPT_CONNECTTIMEOUT_MS instead when
possible.
All stream based methods (WP_Http_Fsockopen, WP_Http_Fopen,
WP_Http_Streams)::
http://us2.php.net/manual/en/function.stream-set-timeout.php
Problem: stream_set_timeout( $handle, $timeout );
Fix: use stream_set_timeout( $handle, $timeout, $utimeout );
fsockopen() does accept a (float) timeout argument, but WP_Http_Fsockopen
also calls stream_set_timeout().
WP_Http_ExtHTTP::
http://us2.php.net/manual/en/http.request.options.php
Problem: timeout, connecttimeout.
Fix: None.
Attached patches all affected WP_Http transports to send timeouts as
ceil()'d integers to their underlying PHP functions. ceil() is used to
prevent sending a timeout of 0.
Setting as Severity:major since this prevents spawn_cron() (which sets a
timeout of 0.01) from spawning anything if the WP_Http_ExtHTTP transport
is used.
Setting as Milestone:2.9. Bump as needed.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11468>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list