Roxen.git / server / base_server / configuration.pike

version» Context lines:

Roxen.git/server/base_server/configuration.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2001, Roxen IS.   //      // @appears Configuration   //! A site's main configuration    - constant cvs_version = "$Id: configuration.pike,v 1.488 2001/09/13 13:15:18 hop Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.489 2001/09/13 21:27:38 nilsson Exp $";   #include <module.h>   #include <module_constants.h>   #include <roxen.h>   #include <request_trace.h>   #include <timers.h>      #define CATCH(P,X) do{mixed e;if(e=catch{X;})report_error("While "+P+"\n"+describe_backtrace(e));}while(0)      // --- Locale defines ---   //<locale-token project="roxen_start"> LOC_S </locale-token>
Roxen.git/server/base_server/configuration.pike:2302:       if(m->raw)    {    res -= "\r";    if(!sscanf(res, "%*s\n\n%s", res))    sscanf(res, "%*s\n%s", res);    }    return res;   }    - int(0..1) is_file(string virt_path, RequestID id) - //! Is `virt_path' a file in our virtual filesystem? + int(0..1) is_file(string virt_path, RequestID id, int(0..1)|void internal) + //! Is @[virt_path] a file in our virtual filesystem? If @[internal] is + //! set, internal files is "visible" as well.   { -  return !!stat_file(virt_path, id); +  if(internal) { +  int(0..1) was_internal = id->misc->internal_get; +  id->misc->internal_get = 1; +  int(0..1) res = !!stat_file(virt_path, id); +  if(!was_internal) +  m_delete(id->misc, "internal_get"); +  return res;    } -  +  if(stat_file(virt_path, id) || +  has_suffix(virt_path, "/internal-roxen-unit")) +  return 1; +  string f = (virt_path/"/")[-1]; +  if( sscanf(f, "internal-roxen-%s", f) ) { +  if(internal_roxen_image(f, id) || +  has_prefix(f, "pixel-")) +  return 1; +  return 0; +  } +  if( sscanf(f, "internal-gopher-%s", f) && +  internal_gopher_image(f) ) +  return 1; +  return 0; + }      array registered_urls = ({}), failed_urls = ({ });   array do_not_log_patterns = 0;   void start(int num)   {    fix_my_url();       // Note: This is run as root if roxen is started as root    foreach( (registered_urls-query("URLs"))+failed_urls, string url )    {