Roxen.git / server / modules / tags / insert_cached_href.pike

version» Context lines:

Roxen.git/server/modules/tags/insert_cached_href.pike:9:      constant cvs_version = "$Id$";      constant thread_safe = 1;   constant module_type = MODULE_TAG;   LocaleString module_name = LOCALE(1, "Tags: Insert cached href");   LocaleString module_doc = LOCALE(2, "This module contains the RXML tag \"insert "    "cached-href\". Useful when implementing e.g."    " RSS syndication.");    + //#define OUTGOING_PROXY_DEBUG +    #if DEBUG_INSERT_CACHED_HREF   #define DWRITE(x) report_debug("INSERT_CACHED_HREF: " + x + "\n")   #else   #define DWRITE(x)   #endif      #ifdef THREADS   private roxen.BackgroundProcess bg_process;   private array(HTTPClient) initiated; /* Contains initiated but unfinished data fetches */   private Thread.Mutex mutex;
Roxen.git/server/modules/tags/insert_cached_href.pike:958:    con->set_callbacks (0, 0);    mutex_key = 0;    }       void run() {    con->set_callbacks(req_ok, req_fail);    con->timeout = timeout;    start_time = time();      #ifdef ENABLE_OUTGOING_PROXY -  if (roxen.query("use_proxy")) { +  if (roxen.query("use_proxy") && sizeof(roxen.query("proxy_url"))) { + #ifdef OUTGOING_PROXY_DEBUG +  werror("Insert cached href: Using proxy: %O to fetch %O...\n", +  roxen.query("proxy_url"), url); + #endif    Protocols.HTTP.do_async_proxied_method(roxen.query("proxy_url"),    roxen.query("proxy_username"),    roxen.query("proxy_password"),    "GET", url, 0,    request_headers, con);    } else {    con->async_request(url->host,url->port,    "GET "+path+(query?("?"+query):"")+" HTTP/1.0",    request_headers);    }