From 202ed7928b409f778a0690cf80fd473cc95e74ec Mon Sep 17 00:00:00 2001 From: rakshasa Date: Wed, 10 Aug 2005 12:20:17 +0000 Subject: [PATCH] * Fixed a compiler warning. * Tell libcurl to follow redirects. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@521 e378c898-3ddf-0310-93e7-cc216c733640 --- src/core/curl_get.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/curl_get.cc b/src/core/curl_get.cc index b74663c7..0e49438e 100644 --- a/src/core/curl_get.cc +++ b/src/core/curl_get.cc @@ -77,7 +77,10 @@ CurlGet::start() { curl_easy_setopt(m_handle, CURLOPT_USERAGENT, m_userAgent.c_str()); curl_easy_setopt(m_handle, CURLOPT_WRITEFUNCTION, &curl_get_receive_write); curl_easy_setopt(m_handle, CURLOPT_WRITEDATA, this); - curl_easy_setopt(m_handle, CURLOPT_FORBID_REUSE, 1); + + curl_easy_setopt(m_handle, CURLOPT_FORBID_REUSE, 1); + curl_easy_setopt(m_handle, CURLOPT_FOLLOWLOCATION, 1); + curl_easy_setopt(m_handle, CURLOPT_MAXREDIRS, 5); m_stack->add_get(this); }