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

version» Context lines:

Roxen.git/server/modules/tags/insert_cached_href.pike:1:   // This is a roxen module. Copyright © 2000 - 2009, Roxen IS.   //      #include <module.h>   inherit "module";      //<locale-token project="mod_insert_cached_href">LOCALE</locale-token>   #define LOCALE(X,Y) _DEF_LOCALE("mod_insert_cached_href",X,Y)    - constant cvs_version = "$Id: insert_cached_href.pike,v 1.25 2009/05/07 14:15:56 mast Exp $"; + constant cvs_version = "$Id: insert_cached_href.pike,v 1.26 2009/09/17 13:21:56 mast Exp $";      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.");      #if DEBUG_INSERT_CACHED_HREF   #define DWRITE(x) report_debug("INSERT_CACHED_HREF: " + x + "\n")
Roxen.git/server/modules/tags/insert_cached_href.pike:715:    string host_header;    if (url->scheme == "http" && url->port == 80)    host_header = sprintf("%s", url->host);    else    host_header = sprintf("%s:%d", url->host, url->port);       mapping default_headers = ([    "user-agent" : "Mozilla/4.0 compatible (Pike HTTP client)",    "host" : host_header ]);    -  if(url->user || url->passwd) +  if(url->user)    default_headers->authorization = "Basic "    + MIME.encode_base64(url->user + ":" +    (url->password || ""));       request_headers = default_headers | request_headers;    query=url->query;    path=url->path;       if(path=="") path="/";    }