Changeset 2ae8ad2 in tol


Ignore:
Timestamp:
May 26, 2011, 10:40:18 AM (15 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
2fa0fec
Parents:
fb0ede0
Message:

Fixes #1207
Refs #927

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@3579 be4846ae-f051-483a-831f-b64e7d08527f

Location:
tol/stdlib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tol/stdlib/TolConfigManager/default.tol

    rfb0ede0 r2ae8ad2  
    6767    "order to download contents from remote URL's. Valid methods are tcl:uri "
    6868    "and sys:wget";
    69     Text UrlDownloader = "tcl:uri"
     69    Text UrlDownloader = "tcl:curl";
     70    Text _.autodoc.member.CurlApiCfg = "Configuración por defecto de CurlApi";
     71    NameBlock CurlApiCfg =
     72    [[
     73      Text _.autodoc.member.verbose = "When True display a lot of verbose "
     74      "information about its operations. Very useful for protocol debugging "
     75      "and understanding.";
     76      Real verbose = 0;
     77      Text _.autodoc.member.connecttimeout = "Set the maximum time in seconds "
     78      "that you allow the connection to the server to take. This only limits "
     79      "the connection phase, once it has connected, this option is of no more "
     80      "use. This is an optional argument, it defaults to 0 which means no "
     81      "timeout.";
     82      Real connecttimeout = 5;
     83      Text _.autodoc.member.timeout = "Set the maximum time in seconds that "
     84      "you allow the transfer operation to take. Do note that normally, name "
     85      "lookups may take a considerable time and that limiting the operation "
     86      "to less than a few minutes risks aborting perfectly normal operations. "
     87      "This is an optional argument, it defaults to 0 which means no timeout.";
     88      Real timeout = 0
     89    ]]
    7090  ]];
    7191  Text _.autodoc.member.Upgrading = "Automated check and upgrade of "
  • tol/stdlib/general/grammars/_text.tol

    rfb0ede0 r2ae8ad2  
    12091209
    12101210//////////////////////////////////////////////////////////////////////////////
    1211 Text GetUrlContents.tcl.curl(Text url)
    1212 //////////////////////////////////////////////////////////////////////////////
    1213 {
    1214   WriteLn("[GetUrlContents.tcl.cur] Sorry, not implemented method.","E");
    1215   ""
     1211Text GetUrlContents.tcl.curl(Text url_)
     1212//////////////////////////////////////////////////////////////////////////////
     1213{
     1214  Write("[GetUrlContents.tcl.curl] Downloading from \""+url_+"\" ... ");
     1215  Set result1 = CurlApi::GetUrl( [[ Text url = url_ ]] );
     1216  If( result1::failStatus,
     1217  {
     1218    WriteLn("FAIL");
     1219    WriteLn( "[GetUrlContents.tcl.curl] error: "<<result1::details,"W");
     1220    ""
     1221  },
     1222  {
     1223    WriteLn("OK");
     1224    result1::bodyData
     1225  })
    12161226};
    12171227
    … …  
    12361246  Case(
    12371247  method=="tcl:uri",  GetUrlContents.tcl.uri (url),
    1238 //method=="tcl:curl", GetUrlContents.tcl.curl(url),
     1248  method=="tcl:curl", GetUrlContents.tcl.curl(url),
    12391249  method=="sys:wget", GetUrlContents.sys.wget(url),
    12401250  1==1, {
  • tol/stdlib/general/system/CurlApi/CurlFunctions.tol

    rfb0ede0 r2ae8ad2  
    6868  //Text file = getOptArg::file;
    6969  Text file = getOptArg( args, "file", "" );
    70   Real verbose = getOptArg( args, "verbose", 0 );
    71   Real connecttimeout = getOptArg( args, "connecttimeout", 5 );
    72   // un paquete no debe tardar mas de 60 segundos en bajar
    73   Real timeout = getOptArg( args, "timeout", 60 );
     70  Real verbose = getOptArg( args, "verbose", TolConfigManager::Config::ExternalTools::CurlApiCfg::verbose );
     71  Real connecttimeout = getOptArg( args, "connecttimeout", TolConfigManager::Config::ExternalTools::CurlApiCfg::connecttimeout );
     72  Real timeout = getOptArg( args, "timeout", TolConfigManager::Config::ExternalTools::CurlApiCfg::timeout );
    7473  // otros argumentos opcionales seran tratados mas adelante
    7574  Set cmd = [[ "::TolCurl::getUrl", url,
Note: See TracChangeset for help on using the changeset viewer.