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.156 2004/03/03 18:12:24 grubba Exp $ + // $Id: module.pike,v 1.157 2004/03/04 12:58: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:955:   //!   //! @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();    tmp_id->not_query = query_location() + "/" + path;    tmp_id->method = "DELELE";    // FIXME: Logging? -  return find_file(path, id) || http_result(404); +  return find_file(path, id) || Roxen.http_status(404);   }      int(0..1) recurse_delete_files(string path, MultiStatus stat, RequestID id)   {    Stat st = stat_file(path, id); -  if (!st) return; +  if (!st) return 0;    if (st->isdir) {    // RFC 2518 8.6.2    // The DELETE operation on a collection MUST act as if a    // "Depth: infinity" header was used on it.    int(0..1) fail;    foreach(find_dir(path, id) || ({}), string fname) {    fail |= recurse_delete_files(path+"/"+fname, stat, id);    }    // RFC 2518 8.6.2    // 424 (Failed Dependancy) errors SHOULD NOT be in the