Mercurial > hg > octave-nkf
changeset 7013:f943e9635115
[project @ 2007-10-11 19:39:02 by jwe]
author | jwe |
---|---|
date | Thu, 11 Oct 2007 19:39:02 +0000 |
parents | fa4b43705e37 |
children | 4389f6bc1ae0 |
files | src/ChangeLog src/DLD-FUNCTIONS/urlwrite.cc src/toplev.cc |
diffstat | 3 files changed, 14 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-10-11 John W. Eaton <jwe@octave.org> + + * DLD-FUNCTIONS/urlwrite.cc (urlget): Disable use of EPSV mode. + 2007-10-11 Brian Gough <bjg@network-theory.co.uk> * DLD-FUNCTIONS/fftn.cc, DLD-FUNCTIONS/regexp.cc, dirfns.cc,
--- a/src/DLD-FUNCTIONS/urlwrite.cc +++ b/src/DLD-FUNCTIONS/urlwrite.cc @@ -126,7 +126,7 @@ curl_easy_setopt (curl, CURLOPT_POSTFIELDS, query_string.c_str ()); } else - curl_easy_setopt (curl, CURLOPT_URL,url.c_str()); + curl_easy_setopt (curl, CURLOPT_URL, url.c_str()); // Define our callback to get called when there's data to be written. curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, write_data); @@ -135,14 +135,19 @@ curl_easy_setopt (curl, CURLOPT_WRITEDATA, static_cast<void*> (&stream)); // Follow redirects. - curl_easy_setopt (curl, CURLOPT_FOLLOWLOCATION, 1); + curl_easy_setopt (curl, CURLOPT_FOLLOWLOCATION, true); + + // Don't use EPSV since connecting to sites that don't support it + // will hang for some time (3 minutes?) before moving on to try PASV + // instead. + curl_easy_setopt (curl, CURLOPT_FTP_USE_EPSV, false); curl_easy_setopt (curl, CURLOPT_NOPROGRESS, true); curl_easy_setopt (curl, CURLOPT_PROGRESSDATA, url.c_str ()); curl_easy_setopt (curl, CURLOPT_FAILONERROR, true); - // Switch on full protocol/debug output - // curl_easy_setopt(curl, CURLOPT_VERBOSE, true); + // Switch on full protocol/debug output. + // curl_easy_setopt (curl, CURLOPT_VERBOSE, true); CURLcode res = CURLE_OK;