aboutsummaryrefslogtreecommitdiffstats
path: root/grpmi/curl_download
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-03-27 15:01:18 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-03-27 15:01:18 +0000
commitd031dacd27bf9308a58b19a03b5f5f540be5e17f (patch)
tree41f5218d3db16a56aed6f31eb95f9237ec40e279 /grpmi/curl_download
parent88a77d0ddac584fbba7b2292e3e43d7154c0123b (diff)
downloadrpmdrake-d031dacd27bf9308a58b19a03b5f5f540be5e17f.tar
rpmdrake-d031dacd27bf9308a58b19a03b5f5f540be5e17f.tar.gz
rpmdrake-d031dacd27bf9308a58b19a03b5f5f540be5e17f.tar.bz2
rpmdrake-d031dacd27bf9308a58b19a03b5f5f540be5e17f.tar.xz
rpmdrake-d031dacd27bf9308a58b19a03b5f5f540be5e17f.zip
fixes for MandrakeClub:
- don't verify peer's certificate (-k option of commandline curl) - allow following locations (allow HTTP redirections) - don't check for hostname before sending authentication (allow HTTP redirection needing authentication to another host)
Diffstat (limited to 'grpmi/curl_download')
-rw-r--r--grpmi/curl_download/curl_download.xs7
1 files changed, 7 insertions, 0 deletions
diff --git a/grpmi/curl_download/curl_download.xs b/grpmi/curl_download/curl_download.xs
index 2aef858a..288982f9 100644
--- a/grpmi/curl_download/curl_download.xs
+++ b/grpmi/curl_download/curl_download.xs
@@ -106,6 +106,13 @@ char * download_url_real(char * url, char * location, char * proxy, char * proxy
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, FALSE);
curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, my_progress_func);
+ /* needed for "insecure" SSL accesses (don't verify the peer's certificate) */
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
+ /* allow Location: to be followed (needed for MandrakeClub) */
+ curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, TRUE);
+ /* when following Location:, allow to still send user+password when hostname changed (needed for Club) */
+ curl_easy_setopt(curl, CURLOPT_NO_HOSTNAME_CHECK_BEFORE_AUTHENTICATION, TRUE);
+
if (proxy && strcmp(proxy, ""))
curl_easy_setopt(curl, CURLOPT_PROXY, proxy);
if (proxy_user && strcmp(proxy_user, ""))