Roxen.git / server / base_server / module.pike

version» Context lines:

Roxen.git/server/base_server/module.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2001, Roxen IS. - // $Id: module.pike,v 1.166 2004/04/28 17:52:43 mast Exp $ + // $Id: module.pike,v 1.167 2004/04/28 17:54:55 mast Exp $      #include <module_constants.h>   #include <module.h>   #include <request_trace.h>      constant __pragma_save_parent__ = 1;      inherit "basic_defvar";   mapping(string:array(int)) error_log=([]);   
Roxen.git/server/base_server/module.pike:284:    }       TRACE_LEAVE("");    return(res);   }      class DefaultPropertySet   {    inherit PropertySet;    +  static Stat stat; +  +  static void create (string path, RequestID id, Stat stat) +  { +  ::create (path, id); +  this_program::stat = stat; +  } +  +  Stat get_stat() {return stat;} +     static mapping(string:string) response_headers;       mapping(string:string) get_response_headers()    {    if (!response_headers) {    // Old kludge inherited from configuration.try_get_file.    if (!id->misc->common)    id->misc->common = ([]);       RequestID sub_id = id->clone_me();
Roxen.git/server/base_server/module.pike:341:   PropertySet|mapping(string:mixed) query_properties(string path, RequestID id)   {    SIMPLE_TRACE_ENTER (this, "Querying properties on %O", path);    Stat st = stat_file(path, id);       if (!st) {    SIMPLE_TRACE_LEAVE ("No such file or dir");    return 0;    }    -  PropertySet res = DefaultPropertySet(path, st, id); +  PropertySet res = DefaultPropertySet(path, id, st);    SIMPLE_TRACE_LEAVE ("");    return res;   }      //! Returns the value of the specified property, or an error code   //! mapping.   //!   //! @note   //! Returning a string is shorthand for returning an array   //! with a single text node.
Roxen.git/server/base_server/module.pike:403:    Parser.XML.Tree.ElementNode descr =    Parser.XML.Tree.ElementNode ("DAV:responsedescription", ([]));    descr->add_child (Parser.XML.Tree.TextNode (ret->rettext));    result->add_response (path, descr);    }    SIMPLE_TRACE_LEAVE ("Got status %d: %O", ret->error, ret->rettext);    return;    }    }    -  if (properties->st->isdir) { +  if (properties->get_stat()->isdir) {    if (depth <= 0) {    SIMPLE_TRACE_LEAVE ("Not recursing due to depth limit");    return;    }    depth--;    foreach(find_dir(path, id) || ({}), string filename) {    recurse_find_properties(combine_path(path, filename), mode, depth,    result, id, filt);    }    }