Just to give back some info I've found:<br /><br />* it's recommanded to use http_proxy (with lower case), because upper case will be deprecated in last curl version:<br />&quot;http_proxy is an exception as it is only available in lower case. &quot; from http://curl.haxx.se/docs/manpage.html<br />* here is the syntax for proxy with authentication:<br />http_proxy=login:password@host:port<br /><br />*here is a little macro I use to deal with http errors (which return no error!):<br /><br />#DOWNLOAD() aims to correct bug from &quot;file(download...&quot; which don't deal with http errors<br />MACRO(FILE_DOWNLOAD url filename error_code error_message)<br />&nbsp; file(DOWNLOAD ${url} ${filename} STATUS DOWNLOAD_STATUS LOG DOWNLOAD_LOG)<br />&nbsp; #message(STATUS &quot;STATUS=${DOWNLOAD_STATUS} LOG=${DOWNLOAD_LOG}&quot;)<br />&nbsp; LIST(GET DOWNLOAD_STATUS 0 ${error_code})<br />&nbsp; LIST(GET DOWNLOAD_STATUS 1 ${error_message})<br />&nbsp; <br />&nbsp; IF(${error_code} EQUAL 0) #look for http error if any<br />&nbsp; &nbsp;&nbsp;&nbsp; string(REGEX MATCH &quot;HTTP/1.[0-9] [0-9][0-9][0-9] [a-zA-Z ]*&quot; ${error_message} ${DOWNLOAD_LOG})<br />&nbsp; &nbsp;&nbsp;&nbsp; string(REGEX MATCH &quot;[0-9][0-9][0-9]&quot; ${error_code} ${${error_message}})<br />&nbsp; &nbsp;&nbsp;&nbsp; string(REGEX REPLACE &quot;HTTP/1.[0-9] [0-9][0-9][0-9] &quot; &quot;&quot; ${error_message} ${${error_message}})<br />&nbsp; &nbsp;&nbsp;&nbsp; IF(${error_code} EQUAL 200)<br />&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; set(${error_code} 0)<br />&nbsp; &nbsp;&nbsp;&nbsp; ENDIF(${error_code} EQUAL 200) <br />&nbsp; ENDIF(${error_code} EQUAL 0)<br />&nbsp; <br />&nbsp; IF(NOT (${error_code} EQUAL 0)) #remove partial file if any error<br />&nbsp; &nbsp;&nbsp;&nbsp; file(REMOVE ${filename})<br />&nbsp; ENDIF(NOT (${error_code} EQUAL 0))<br />&nbsp;&nbsp;&nbsp; <br />&nbsp; #message(STATUS &quot;error_code=${${error_code}}&quot;)<br />&nbsp; #message(STATUS &quot;error_message=${${error_message}}&quot;)<br />ENDMACRO(FILE_DOWNLOAD)<BR><BR><a target=_blank href=http://www.laposte.net/rallye-des-gazelles><img style="margin: 0pt;" src="http://webmail.laposte.net/webmail/fr_FR/panels/images/laposte-pieddemail-gazelles3.jpg" alt="Pieddemail"><a>