Feeds has this function:
/**
* Decides if it's possible to use cURL or not.
*
* @return
* TRUE if curl is available, FALSE otherwise.
*/
function http_request_use_curl() {
$basedir = ini_get("open_basedir");
return function_exists('curl_init') && !ini_get('safe_mode') && empty($basedir);
}
And it is used to decide whether to use drupal_http_request()
or cURL (called by feeds) when fetching feeds by the default http fetcher.
This is all well and good, and I'm sure there are good reasons for using cURL, but in some cases using drupal_http_request()
is needed, like when you've already hacked it to use cURL (say, if you needed to authenticate to a proxy, using SSL.) Now, I don't want to maintain my hack in two different places, so could we just get a 'hidden' variable that forces feeds to never use cURL. I.e. the above function just returns FALSE, in that case.
Comment | File | Size | Author |
---|---|---|---|
#7 | feeds-883342.patch | 1.45 KB | Steven Jones |
#5 | feeds-883342.patch | 832 bytes | Steven Jones |
Comments
Comment #1
alex_b CreditAttribution: alex_b commentedI'd accept such a patch.
Comment #2
beanworks CreditAttribution: beanworks commentedHmm. When will such a patch be available?
Comment #3
Daniel A. Beilinson CreditAttribution: Daniel A. Beilinson commentedHello!
In my case
curl -I http://drupal.org/node/feed
returnsBut I received damned -1003 code without forcibly returning FALSE to this function.
Comment #4
Steven Jones CreditAttribution: Steven Jones commentedWill do this when I get time.
Comment #5
Steven Jones CreditAttribution: Steven Jones commentedPatch attached.
Comment #6
alex_b CreditAttribution: alex_b commentedThis looks good. Can we get documentation in README.txt for it? (see hidden variables section).
Comment #7
Steven Jones CreditAttribution: Steven Jones commentedOoo...didn't know about that section in the readme.
Patch attached.
Comment #8
alex_b CreditAttribution: alex_b commentedThanks!
Comment #9
alex_b CreditAttribution: alex_b commentedCommitted, needs a D7 port now.
http://drupal.org/cvs?commit=443292
Comment #10
alex_b CreditAttribution: alex_b commented#7 Applied to 7.x 2.x fine:
http://drupal.org/cvs?commit=443296
Thank you!
Comment #12
lindsayo CreditAttribution: lindsayo commentedposted in the wrong node, apologies.
-L