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.199 2004/05/12 15:19:48 mast Exp $ + // $Id: module.pike,v 1.200 2004/05/12 16:12:24 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:1201:    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 fail;    if (!has_suffix(path, "/")) path += "/";    foreach(find_dir(path, id) || ({}), string fname) {    fname = path + fname;    if (Stat sub_stat = stat_file (fname, id)) {    SIMPLE_TRACE_ENTER (this, "Deleting %O recursively", fname); -  mapping(string:mixed) sub_res = recurse(fname, sub_stat); +  if (mapping(string:mixed) sub_res = recurse(fname, sub_stat)) {    // RFC 2518 8.6.2    // 424 (Failed Dependancy) errors SHOULD NOT be in the    // 207 (Multi-Status).    //    // Additionally 204 (No Content) errors SHOULD NOT be returned    // in the 207 (Multi-Status). The reason for this prohibition    // is that 204 (No Content) is the default success code. -  if (sub_res && sub_res->error != 204 && sub_res->error != 424) { +  if (sub_res->error != 204 && sub_res->error != 424) {    stat->add_status(fname, sub_res->error, sub_res->rettext); -  +  }    if (sub_res->error >= 300) fail = 1;    }    }    }    if (fail) {    SIMPLE_TRACE_LEAVE ("Partial failure");    return Roxen.http_status(424);    }    }