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.180 2004/05/06 15:32:55 grubba Exp $ + // $Id: module.pike,v 1.181 2004/05/06 16:50:16 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:286:    TRACE_LEAVE("");    return(res);   }      class DefaultPropertySet   {    inherit PropertySet;       static Stat stat;    -  static void create (string path, RequestID id, Stat stat) +  static void create (string path, string abs_path, RequestID id, Stat stat)    { -  ::create (path, id); +  ::create (path, abs_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) {
Roxen.git/server/base_server/module.pike:351:   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, id, st); +  PropertySet res = DefaultPropertySet(path, query_location()+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:1024:   //! Delete the file specified by @[path].   //!   //! @note   //! Should return a 204 status on success.   //!   //! @note   //! The default implementation falls back to @[find_file()].   mapping(string:mixed) delete_file(string path, RequestID id)   {    // Fall back to find_file(). -  RequestID tmp_id = id->close_me(); +  RequestID tmp_id = id->clone_me();    tmp_id->not_query = query_location() + path; -  tmp_id->method = "DELELE"; +  tmp_id->method = "DELETE";    // FIXME: Logging?    return find_file(path, id) || Roxen.http_status(404);   }      int(0..1) recurse_delete_files(string path, MultiStatus.Prefixed stat, RequestID id)   {    Stat st = stat_file(path, id);    if (!st) return 0;    if (st->isdir) {    // RFC 2518 8.6.2