Roxen.git / server / modules / filesystems / filesystem.pike

version» Context lines:

Roxen.git/server/modules/filesystems/filesystem.pike:1:   // This is a ChiliMoon module. Copyright © 1996 - 2001, Roxen IS.      // This is a virtual "file-system".   // It will be located somewhere in the name-space of the server.   // Also inherited by some of the other filesystems.      inherit "module";   inherit "socket";    - constant cvs_version = "$Id: filesystem.pike,v 1.127 2004/06/04 08:29:20 _cvs_stephen Exp $"; + constant cvs_version = "$Id: filesystem.pike,v 1.128 2004/06/04 08:33:16 _cvs_stephen Exp $";   constant thread_safe = 1;      #include <module.h>   #include <stat.h>   #include <request_trace.h>   #include <roxen.h>      // NGSERVER: Make an API where a module can send back an error token which is   // then substituted with the apropriate message for the protocol and locale.   // This would enable us to theme other error pages than the now special case 404.
Roxen.git/server/modules/filesystems/filesystem.pike:353:      string decode_path( string p )   {    if( path_encoding != "iso-8859-1" )    p = Locale.Charset.encoder( path_encoding )->feed( p )->drain();   #ifndef __NT__    if( String.width( p ) != 8 )    p = string_to_utf8( p );   #else    while( sizeof(p) && p[-1] == '/' ) -  p = p[..strlen(p)-2]; +  p = p[..sizeof(p)-2];   #endif    return p;   }      string real_path(string f, RequestID id)   {    f = path + f;    if (FILTER_INTERNAL_FILE(f, id)) return 0;    catch {    f = NORMALIZE_PATH(decode_path(f));