[wp-trac] [WordPress Trac] #13841: Some HTTP Transports do not respect transfer timeouts
WordPress Trac
wp-trac at lists.automattic.com
Fri Jun 11 13:23:36 UTC 2010
#13841: Some HTTP Transports do not respect transfer timeouts
--------------------------+-------------------------------------------------
Reporter: sivel | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.1
Component: HTTP | Version: 3.0
Severity: normal | Keywords: has-patch dev-feedback early
--------------------------+-------------------------------------------------
Comment(by jacobsantos):
Using the 'timeout' option for streams is kind of iffy because it is only
supported on PHP5.2.1+. Granted majority of PHP5 hosts are going to have
upgraded to at least PHP5.2.3 by now, there are likely still enough people
on dedicated or shared hosts that are running PHP5.1.6 (since CentOS
doesn't have an official release for PHP5.2.x yet or if they do it is a
recent one which still might not have people upgrade to it yet).
I have a fix for only adding Fopen Transport when PHP4 is used and not
when PHP5 is used. I think right now, it will go Streams -> Fopen ->
Fsockopen, which is not how it should be on PHP5. It should be Streams ->
Fsockopen. There is really only so much you can do for Fopen, so if that
set_stream_timeout isn't working then I'm not exactly sure what the fix is
for it. I'm surprised really that it isn't working because that is how PHP
says you are supposed to set the Timeout for stream connections and for
PHP4 connections.
I'm thinking about implementing the Socket way, but I believe that is also
PHP5+. It may fix a lot of the issues with the Streams and provide another
reliable transport.
Thanks for the additional information. When I first got into this, I
figured, "Well, it isn't like the Language itself is going to have bugs,
so I just follow the normal way of implementing this. Right?" Wrong.
Thankfully, !WordPress has many people working on the HTTP API, because I
don't believe one person alone could have discovered all of these problems
alone in PHP or at least discovered workarounds.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13841#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list