aboutsummaryrefslogtreecommitdiffstats
path: root/grpmi/curl_download/curl_download.xs
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2002-08-30 18:15:36 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2002-08-30 18:15:36 +0000
commit825a6a0d7b41e624c01d0236ec73d31296c352c6 (patch)
tree9932bf3bb6ca7b5d10ca80aca7e4d122a402d5bd /grpmi/curl_download/curl_download.xs
parent0e08c3052db01f30ac90f56c6d57a8ec3b01e29b (diff)
downloadrpmdrake-825a6a0d7b41e624c01d0236ec73d31296c352c6.tar
rpmdrake-825a6a0d7b41e624c01d0236ec73d31296c352c6.tar.gz
rpmdrake-825a6a0d7b41e624c01d0236ec73d31296c352c6.tar.bz2
rpmdrake-825a6a0d7b41e624c01d0236ec73d31296c352c6.tar.xz
rpmdrake-825a6a0d7b41e624c01d0236ec73d31296c352c6.zip
handle /etc/urpmi/proxy.cfg proxies, have a proxy dialog config in
edit-urpm-sources
Diffstat (limited to 'grpmi/curl_download/curl_download.xs')
-rw-r--r--grpmi/curl_download/curl_download.xs11
1 files changed, 7 insertions, 4 deletions
diff --git a/grpmi/curl_download/curl_download.xs b/grpmi/curl_download/curl_download.xs
index ab200d6f..2297555d 100644
--- a/grpmi/curl_download/curl_download.xs
+++ b/grpmi/curl_download/curl_download.xs
@@ -71,7 +71,7 @@ int my_progress_func(void *ptr, double td, double dd, double tu, double du)
return 0;
}
-char * download_url_real(char * url, char * location, char * proxy)
+char * download_url_real(char * url, char * location, char * proxy, char * proxy_user)
{
CURL *curl;
CURLcode rescurl = CURL_LAST;
@@ -108,6 +108,8 @@ char * download_url_real(char * url, char * location, char * proxy)
if (proxy && strcmp(proxy, ""))
curl_easy_setopt(curl, CURLOPT_PROXY, proxy);
+ if (proxy_user && strcmp(proxy_user, ""))
+ curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, proxy_user);
rescurl = curl_easy_perform(curl);
@@ -269,14 +271,15 @@ MODULE = curl_download PACKAGE = curl_download
PROTOTYPES : DISABLE
char *
-download(url, location, proxy, downloadprogress_callback)
+download_real(url, location, downloadprogress_callback, proxy, proxy_user)
char * url
char * location
- char * proxy
SV * downloadprogress_callback
+ char * proxy
+ char * proxy_user
CODE:
downloadprogress_callback_sv = downloadprogress_callback;
- RETVAL = download_url_real(url, location, proxy);
+ RETVAL = download_url_real(url, location, proxy, proxy_user);
OUTPUT:
RETVAL