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 - 2009, Roxen IS.   //      // @appears Configuration   //! A site's main configuration    - constant cvs_version = "$Id: configuration.pike,v 1.719 2011/06/19 14:49:07 mast Exp $"; + constant cvs_version = "$Id$";   #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)      // Tell Pike.count_memory this is global.   constant pike_cycle_depth = 0;
Roxen.git/server/base_server/configuration.pike:2518:    TRACE_LEAVE("");    PROF_LEAVE(Roxen.get_owning_module(tmp)->module_name,"filter");    }    TIMER_END(filter_modules);       root_id->misc->_request_depth--;    id->misc->internal_get = orig_internal_get;    return res;   }    + protected string combine_combiners(string s) + { +  if (String.width(s) <= 8) return s; +  return Unicode.normalize(s, "NFC"); + } +    array(string) find_dir(string file, RequestID id, void|int(0..1) verbose)   {    array dir;    TRACE_ENTER(sprintf("List directory %O.", file), 0);       if(!sizeof (file) || file[0] != '/')    file = "/" + file;      #ifdef URL_MODULES   #ifdef THREADS
Roxen.git/server/base_server/configuration.pike:2565: Inside #if defined(URL_MODULES)
   if( id->misc->find_dir_nest < 20 )    dir = (id->conf || this_object())->find_dir( file, id );    else    error("Too deep recursion in roxen::find_dir() while mapping "    +file+".\n");    };    id->misc->find_dir_nest = 0;    TRACE_LEAVE("");    if(err)    throw(err); +  if (arrayp(dir)) { +  return map(dir, combine_combiners); +  }    return dir;    }    id->not_query=of;    }   #endif /* URL_MODULES */       array | mapping d;    array(string) locks=({});    RoxenModule mod;    string loc;
Roxen.git/server/base_server/configuration.pike:2595:    }   #endif    mod=function_object(tmp[1]);    if(d=mod->find_dir(file[strlen(loc)..], id))    {    if(mappingp(d))    {    if(d->files) {    TRACE_LEAVE("Got exclusive directory.");    TRACE_LEAVE(sprintf("Returning list of %d files.", sizeof(d->files))); -  return d->files; +  return map(d->files, combine_combiners);    } else    TRACE_LEAVE("");    } else {    TRACE_LEAVE("Got files.");    if(!dir) dir=({ });    dir |= d;    }    }    else {    if(verbose && mod->list_lock_files)
Roxen.git/server/base_server/configuration.pike:2630:    } else {    dir = ({ loc });    }    TRACE_LEAVE("Added module mountpoint.");    }    }    if(!dir) return verbose ? ({0})+locks : ([])[0];    if(sizeof(dir))    {    TRACE_LEAVE(sprintf("Returning list of %d files.", sizeof(dir))); -  return dir; +  return map(dir, combine_combiners);    }    TRACE_LEAVE("Returning 'No such directory'.");    return 0;   }      // Stat a virtual file.      array(int)|Stat stat_file(string file, RequestID id)   {    mixed s, tmp;