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.516 2002/05/29 15:35:20 jonasw Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.517 2002/06/03 20:36:10 per 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:1014:   // Some clients does _not_ handle the magic 'internal-gopher-...'.   // So, lets do it here instead.   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"); +  Stdio.File f = lopen("etc/images/dir/"+from+".gif","r");    if (f)    return (["file":f, "type":"image/gif", "stat":f->stat(),]);    else    return 0;    // File not found.   }      private static int nest = 0;      #ifdef MODULE_LEVEL_SECURITY
Roxen.git/server/base_server/configuration.pike:1146:    // Automatically generated colorbar. Used by wizard code...    int hue,bright,w;    if(sscanf(from, "%*s:%d,%d,%d", hue, bright,w)==4) {    array bar = draw_saturation_bar(hue, bright, w);    return Roxen.http_string_answer(bar[0], bar[1]);    }       Stdio.File f;       if( !id->misc->internal_get ) -  if(f = lopen("roxen-images/"+from+".gif", "r")) +  if(f = lopen("etc/images/"+from+".gif", "r"))    return (["file":f, "type":"image/gif", "stat":f->stat()]);    -  if(f = lopen("roxen-images/"+from+".png", "r")) +  if(f = lopen("etc/images/"+from+".png", "r"))    return (["file":f, "type":"image/png", "stat":f->stat()]);    -  if(f = lopen("roxen-images/"+from+".jpg", "r")) +  if(f = lopen("etc/images/"+from+".jpg", "r"))    return (["file":f, "type":"image/jpeg", "stat":f->stat()]);    -  if(f = lopen("roxen-images/"+from+".xcf", "r")) +  if(f = lopen("etc/images/"+from+".xcf", "r"))    return (["file":f, "type":"image/x-gimp-image", "stat":f->stat()]);    -  if(f = lopen("roxen-images/"+from+".gif", "r")) +  if(f = lopen("etc/images/"+from+".gif", "r"))    return (["file":f, "type":"image/gif", "stat":f->stat()]);    // File not found.    return 0;   }         mapping (mixed:function|int) locks = ([]);      #ifdef THREADS   // import Thread;