Roxen.git / server / base_server / configuration.pike

version» Context lines:

Roxen.git/server/base_server/configuration.pike:1:   // A vitual server's main configuration   // Copyright © 1996 - 2000, Roxen IS.    - constant cvs_version = "$Id: configuration.pike,v 1.353 2000/08/28 06:52:09 per Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.354 2000/08/28 12:02:54 per Exp $";   constant is_configuration = 1;   #include <module.h>   #include <module_constants.h>   #include <roxen.h>   #include <request_trace.h>      inherit "basic_defvar";      mapping enabled_modules = ([]);   mapping(string:array(int)) error_log=([]);
Roxen.git/server/base_server/configuration.pike:600:   private mapping internal_gopher_image(string from)   {    sscanf(from, "%s.gif", from);    sscanf(from, "%s.jpg", from);    from -= ".";    // Disallow "internal-gopher-..", it won't really do much harm, but a list of    // all files in '..' might be retrieved (that is, the actual directory    // file was sent to the browser)    Stdio.File f = lopen("roxen-images/dir/"+from+".gif","r");    if (f) -  { -  return (["file":f, "type":"image/gif"]); -  } else { -  // File not found. +  return (["file":f, "type":"image/gif", "stat":f->stat(),]); +  else    return 0; -  +  // File not found.   } - } +       private static int nest = 0;      #ifdef MODULE_LEVEL_SECURITY   private mapping misc_cache=([]);      int|mapping check_security(function|object a, RequestID id, void|int slevel)   {    array level;    array seclevels;
Roxen.git/server/base_server/configuration.pike:797:    sscanf(from, "%s.png", from);       // Automatically generated colorbar. Used by wizard code...    int hue,bright,w;    if(sscanf(from, "%*s:%d,%d,%d", hue, bright,w)==4)    return Roxen.http_string_answer(draw_saturation_bar(hue,bright,w),"image/gif");       Stdio.File f;       if(f = lopen("roxen-images/"+from+".gif", "r")) -  return (["file":f, "type":"image/gif"]); +  return (["file":f, "type":"image/gif", "stat":f->stat()]);    if(f = lopen("roxen-images/"+from+".jpg", "r")) -  return (["file":f, "type":"image/jpeg"]); +  return (["file":f, "type":"image/jpeg", "stat":f->stat()]);    if(f = lopen("roxen-images/"+from+".png", "r")) -  return (["file":f, "type":"image/png"]); +  return (["file":f, "type":"image/png", "stat":f->stat()]);    if(f = lopen("roxen-images/"+from+".xcf", "r")) -  return (["file":f, "type":"image/x-gimp-image"]); +  return (["file":f, "type":"image/x-gimp-image", "stat":f->stat()]);    // File not found.    return 0;   }         mapping (mixed:function|int) locks = ([]);      #ifdef THREADS   // import Thread;