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.564 2004/05/03 16:09:43 grubba Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.565 2004/05/03 20:24:26 grubba 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:1323:    if (stringp(m->extra_heads["content-type"]) ||    stringp(m->type)) {    res += sprintf(" of %O", m->type||m->extra_heads["content-type"]);    }       res+="<br />";       return res;   }    + //! Find all applicable locks for this user on @[path]. + multiset(DAVLock) find_locks(string path, int(0..1) recursive, +  int(0..1) exclude_shared, RequestID id) + { +  multiset(DAVLock) locks = (<>); +  +  foreach(location_module_cache||location_modules(), +  [string loc, function func]) +  { +  string subpath; +  if (has_prefix(path, loc)) { +  // path == loc + subpath. +  subpath = path[sizeof(loc)..]; +  } else if (recursive && has_prefix(loc, path)) { +  // loc == path + ignored. +  subpath = "/"; +  } else { +  // Does not apply to this location module. +  continue; +  } +  multiset(DAVLock) sub_locks = +  function_object(func)->find_locks(subpath, recursive, +  exclude_shared, id); +  if (sub_locks) locks |= sub_locks; +  } +  return locks; + } +    //! Check if there are any applicable locks for this user on @[path].   int(-2..1)|DAVLock check_locks(string path, int(0..1) recursive, RequestID id)   {    foreach(location_module_cache||location_modules(),    [string loc, function func])    {    string subpath;    if (has_prefix(path, loc)) {    // path == loc + subpath.    subpath = path[sizeof(loc)..];