This is a META bug to catch all the current CURL / download_file_content() and componentlib issues.
All downloads within Moodle (timezones, langs, environment stuff..) should be using the download_file_content() function that internally uses CURL (PHP extension, OS executable or PHP emulation) to provide transparent access with proxies and other intermediaries).
To do so, there are some related tasks and existing bugs that must be fixed. Here it's the list, more or less in order:
MDLSITE-318 : In order to be able to implement unit tests of all the download stuff, we need some "static" files somewhere.
MDL-11845 : Reopened because right now, OS executable curl seems to garble binary files. That prevents componentlib to work under Moodle 1.9 (lang files and environment stuff).
MDL-7947 and MDL-8018 : About to use CURL as standard method for any download within Moodle. Seem to be duplicates.
MDL-7921 : About proxy usernames and passwords, also related with CURL.
MDL-12698: Fix componentlib to use download_file_content() and some other minor refinements.
MDL-12024 : About to new olson files downloaded via componentlib (need previous working for binary files).