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 - 2004, Roxen IS. - // $Id: module.pike,v 1.216 2004/06/30 16:58:38 mast Exp $ + // $Id: module.pike,v 1.217 2004/09/19 18:07:22 grubba 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:246:    for (int i = 0; i < sizeof (urls); i++)    {    urls[i] = (urls[i]/"#")[0];    if (sizeof (urls[i]/"*") == 2)    urls[i] = replace(urls[i], "*", hostname);    }    return map (urls, `+, loc[1..]);   }      /* By default, provide nothing. */ - string query_provides() { return 0; } + multiset(string) query_provides() { return 0; }         function(RequestID:int|mapping) query_seclevels()   {    if(catch(query("_seclevels")) || (query("_seclevels") == 0))    return 0;    return roxen.compile_security_pattern(query("_seclevels"),this_object());   }      void set_status_for_path (string path, RequestID id, int status_code,
Roxen.git/server/base_server/module.pike:381:      //! Return the set of properties for @[path].   //!   //! @returns   //! Returns @tt{0@} (zero) if @[path] does not exist.   //!   //! Returns an error mapping if there's some other error accessing   //! the properties.   //!   //! Otherwise returns a @[PropertySet] object. + //! + //! @seealso + //! @[query_property()]   PropertySet|mapping(string:mixed) query_property_set(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;    }   
Roxen.git/server/base_server/module.pike:402:    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. + //! + //! @seealso + //! @[query_property_set()]   string|array(Parser.XML.Tree.SimpleNode)|mapping(string:mixed)    query_property(string path, string prop_name, RequestID id)   {    mapping(string:mixed)|PropertySet properties = query_property_set(path, id);    if (!properties) {    return Roxen.http_status(Protocols.HTTP.HTTP_NOT_FOUND,    "No such file or directory.");    }    if (mappingp (properties))    return properties;    return properties->query_property(prop_name) ||    Roxen.http_status(Protocols.HTTP.HTTP_NOT_FOUND, "No such property.");   }      //! RFC 2518 PROPFIND implementation with recursion according to - //! @[depth]. See @[find_properties] for details. + //! @[depth]. See @[PropertySet()->find_properties()] for details. + //! + //! @seealso + //! @[query_property_set()]   mapping(string:mixed) recurse_find_properties(string path, string mode,    int depth, RequestID id,    multiset(string)|void filt)   {    MultiStatus.Prefixed result =    id->get_multi_status()->prefix (id->url_base() + query_location()[1..]);       mapping(string:mixed) recurse (string path, int depth) {    SIMPLE_TRACE_ENTER (this, "%s for %O, depth %d",    mode == "DAV:propname" ? "Listing property names" :