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.473 2001/08/24 19:02:08 nilsson Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.474 2001/08/28 15:37:40 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:421:    }    }   }      string type_from_filename( string file, int|void to, string|void myext )   {    array(string)|string tmp;    if(!types_fun)    return to?({ "application/octet-stream", 0 }):"application/octet-stream";    -  string ext=myext || Roxen.extension(file); +  string ext = lower_case(myext || Roxen.extension(file));       if(tmp = types_fun(ext))    {    mixed tmp2,nx; -  if(tmp[0] == "strip") +  // FIXME: Ought to support several levels of "strip". +  if (tmp[0] == "strip")    {    tmp2=file/"."; -  if(sizeof(tmp2) > 2) +  if (sizeof(tmp2) > 2)    nx=tmp2[-2]; -  if(nx && (tmp2=types_fun(nx))) +  if (nx && (tmp2 = types_fun(nx)))    tmp[0] = tmp2[0]; -  else if(tmp2=types_fun("default")) +  else if (tmp2 = types_fun("default"))    tmp[0] = tmp2[0];    else -  tmp[0]="application/octet-stream"; +  tmp[0] = "application/octet-stream";    } -  } else if(!(tmp = types_fun("default"))) { +  } else if (!(tmp = types_fun("default"))) {    tmp = ({ "application/octet-stream", 0 });    }    return to?tmp:tmp[0];   }      array (RoxenModule) get_providers(string provides)   //! Returns an array with all provider modules that provides "provides".   {    // This cache is cleared in the invalidate_cache() call.    if(!provider_module_cache[provides])
Roxen.git/server/base_server/configuration.pike:519:    })) {    error[0] = "Error in call_provider(): "+error[0];    throw(error);    }    }    }   }      array (function) file_extension_modules(string ext)   { -  if(!file_extension_module_cache[ext]) +  if(!file_extension_module_cache[ext = lower_case(ext)])    {    int i;    file_extension_module_cache[ext] = ({ });    for(i=9; i>=0; i--)    {    array(RoxenModule) d;    RoxenModule p;    if(d = pri[i]->file_extension_modules[ext])    foreach(d, p)    file_extension_module_cache[ext] += ({ p->handle_file_extension });
Roxen.git/server/base_server/configuration.pike:2757:    " MODULE_LAST.\n", moduleinfo->get_name());    }       if(module_type & MODULE_FILE_EXTENSION)    if (err = catch {    array arr = me->query_file_extensions();    if (arrayp(arr))    {    string foo;    foreach( me->query_file_extensions(), foo ) -  if(pri[pr]->file_extension_modules[foo] ) -  pri[pr]->file_extension_modules[foo]+=({me}); +  if(pri[pr]->file_extension_modules[foo = lower_case(foo)] ) +  pri[pr]->file_extension_modules[foo] += ({me});    else -  pri[pr]->file_extension_modules[foo]=({me}); +  pri[pr]->file_extension_modules[foo] = ({me});    }    }) {   #ifdef MODULE_DEBUG    if (enable_module_batch_msgs) report_debug("\bERROR\n");   #endif    string bt=describe_backtrace(err);    report_error(LOC_M(41, "Error while initiating module copy of %s%s"),    moduleinfo->get_name(), (bt ? ":\n"+bt : "\n"));    got_no_delayed_load = -1;    }