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 - 2004, Roxen IS.   //      // @appears Configuration   //! A site's main configuration    - constant cvs_version = "$Id: configuration.pike,v 1.585 2004/10/11 19:05:38 mast Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.586 2005/01/05 11:11:16 jonasw 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:654:    RoxenModule p;    if(d=pri[i]->last_modules)    foreach(d, p)    if(p->last_resort)    last_module_cache += ({ p->last_resort });    }    }    return last_module_cache;   }    - #ifdef __NT__ +    static mixed strip_fork_information(RequestID id)   { -  +  if (uname()->sysname == "Darwin") { +  // Look for Mac OS X special filenames that are used access files in +  // magic ways: +  // +  // foo.txt/..namedfork/data (same as foo.txt) +  // foo.txt/..namedfork/rsrc (resource fork of foo.txt) +  // foo.txt/rsrc (resource fork of foo.txt) +  // .DS_Store (Finder info file with catalog data) +  if (has_value(id->not_query, "..namedfork/") || +  has_suffix(id->not_query, "/rsrc") || +  has_value(lower_case(id->not_query), ".ds_store")) +  // Show 404 page +  return error_file(id); +  } +     array a = id->not_query/"::";    // FIX: Must not subtract ":" chars since it breaks proper URL:s,    // e.g. "/internal-roxen-colorbar:x,y,z" and several others.    // id->not_query = a[0]-":";    id->not_query = a[0];    id->misc->fork_information = a[1..];    return 0;   } - #endif /* __NT__ */ +       array (function) first_modules()   {    if(!first_module_cache)    {    int i; -  first_module_cache=({ +  first_module_cache = ({ }); +  +  // Add special fork handlers on Windows and Mac OS X +  if (   #ifdef __NT__ -  +  1 || + #endif +  uname()->sysname == "Darwin") { +  first_module_cache= ({    strip_fork_information, // Always first! - #endif /* __NT__ */ +     }); -  +  } +     for(i=9; i>=0; i--)    {    array(RoxenModule) d; RoxenModule p;    if(d=pri[i]->first_modules) {    foreach(d, p) {    if(p->first_try) {    first_module_cache += ({ p->first_try });    }    }    }