Roxen.git / server / base_server / module.pike

version» Context lines:

Roxen.git/server/base_server/module.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2001, Roxen IS. - // $Id: module.pike,v 1.129 2001/08/28 15:47:59 per Exp $ + // $Id: module.pike,v 1.130 2001/10/05 15:08:00 per Exp $      #include <module_constants.h>   #include <module.h>   #include <request_trace.h>      constant __pragma_save_parent__ = 1;      inherit "basic_defvar";   mapping(string:array(int)) error_log=([]);   
Roxen.git/server/base_server/module.pike:236:    string loc = query_location();    if (!loc) return ({});    if(!_my_configuration)    error("Please do not call this function from create()!\n");    array(string) urls = copy_value(_my_configuration->query("URLs"));    string hostname;    if (string world_url = _my_configuration->query ("MyWorldLocation"))    sscanf (world_url, "%*s://%s%*[:/]", hostname);    if (!hostname) hostname = gethostname();    for (int i = 0; i < sizeof (urls); i++) +  { +  urls[i] = (urls[i]/"#")[0];    if (sizeof (urls[i]/"*") == 2)    urls[i] = replace(urls[i], "*", hostname); -  +  }    return map (urls, `+, loc[1..]);   }      /* By default, provide nothing. */   string query_provides() { return 0; }         function(RequestID:int|mapping) query_seclevels()   {    if(catch(query("_seclevels")) || (query("_seclevels") == 0))