summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2005-04-26 03:02:52 +0000
committerJason Woodward2005-04-26 03:02:52 +0000
commite13d56c5b49c47b5600538c2dd473ecc03402d75 (patch)
treecabc6c13381a163b942c5441ef102651761552cd
parent40cfdf80577fd3577c5499edcc8747d88802429a (diff)
downloadslapt-get-e13d56c5b49c47b5600538c2dd473ecc03402d75.tar.gz
added libcurl option CURLOPT_FOLLOWLOCATION so HTTP redirects are followed
-rw-r--r--ChangeLog1
-rw-r--r--src/curl.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index afe3214..2199423 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
0.9.9k Apr 25, 2005
+ * added libcurl option CURLOPT_FOLLOWLOCATION so HTTP redirects are followed
* initialized source in sources list [fixing valgrind warning]
* updated FAQ
diff --git a/src/curl.c b/src/curl.c
index 23250b3..6c9ef60 100644
--- a/src/curl.c
+++ b/src/curl.c
@@ -44,6 +44,7 @@ int download_data(FILE *fh,const char *url,size_t bytes,const rc_config *global_
curl_easy_setopt(ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY );
#endif
curl_easy_setopt(ch, CURLOPT_FILETIME, 1 );
+ curl_easy_setopt(ch, CURLOPT_FOLLOWLOCATION, 1 );
headers = curl_slist_append(headers, "Pragma: "); /* override no-cache */
@@ -137,6 +138,7 @@ char *head_request(const char *url){
curl_easy_setopt(ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY );
#endif
curl_easy_setopt(ch, CURLOPT_FILETIME, 1 );
+ curl_easy_setopt(ch, CURLOPT_FOLLOWLOCATION, 1 );
headers = curl_slist_append(headers, "Pragma: "); /* override no-cache */