[wp-trac] [WordPress Trac] #16606: WP_Http_Streams::test doesn't check enough to confirm if it can do HTTPS
WordPress Trac
wp-trac at lists.automattic.com
Sat Apr 2 13:04:53 UTC 2011
#16606: WP_Http_Streams::test doesn't check enough to confirm if it can do HTTPS
---------------------------------+-----------------------------
Reporter: westi | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: Future Release
Component: HTTP | Version: 3.0.5
Severity: major | Resolution:
Keywords: 3.2-early has-patch |
---------------------------------+-----------------------------
Comment (by hakre):
Replying to [comment:6 mdawaffe]:
> What's the use case for the filter when {{{function_exists( 'fopen' )}}}
returns {{{false}}}?
Hooks can still filter it. E.g. reporting, enable / creating functions
etc. (dl etc.).
> Can we turn this into a generic ticket that adds an SSL check to the
{{{::test()}}} methods for all the WP_HTTP transports?
>
> Attached does so, but does not have some of the additional checks of
hakre's patch (I wrote it before finding this ticket).
>
> 1. Return false if the required function doesn't exist or could never
work.
> 2. Check for the openssl extension or CURL_VERSION_SSL as needed.
> 3. Return filtered boolean.
The additional checks in my last ticket are mostly as a "complete" check,
so to pick from those as needed.
I think it's good to streamline all tests. I think it's worth to let them
all run after a common principle (do one check after the other unless
false) then then the filter at the end of the function, one return
statement at the end only. So all test() functions have the same level of
quality.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16606#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list