Roxen.git / server / modules / filesystems / filesystem.pike

version» Context lines:

Roxen.git/server/modules/filesystems/filesystem.pike:1576:    "infinity")) {    // RFC 2518 8.6.2:    // The DELETE method on a collection MUST act as if a "Depth: infinity"    // header was used on it.    TRACE_LEAVE(sprintf("DELETE: Bad depth header: %O.",    id->request_headers->depth));    return Roxen.http_status(400, "Unsupported depth.");    }       if (size < 0) { -  mapping|int(0..1) res; -  if (mappingp(res = write_access(combine_path(f, "../"), 1, id)) || +  mapping|int(0..1) res = write_access(combine_path(f, "../"), 1, id); +  if (mappingp(res) && (res->error == Protocols.HTTP.HTTP_PRECOND_FAILED)) { +  // NB: Preconditions in the If-header don't apply to the directory. +  // Force a retry at the level below. +  res = 1; +  } +  if (mappingp(res) ||    (res && mappingp(res = write_access(f, 1, id)))) {    SIMPLE_TRACE_LEAVE("DELETE: Recursive write access denied.");    return res;    }   #if 0    report_notice(LOCALE(64,"DELETING the directory %s.\n"), f);   #endif       accesses++;   
Roxen.git/server/modules/filesystems/filesystem.pike:1613:    } else {    return errno_to_status (errno(), 0, id);    }       if (id->multi_status_size() > start_ms_size) {    TRACE_LEAVE("DELETE: Partial failure.");    return ([]);    }    }    } else { -  mapping|int(0..1) res; -  if ((res = write_access(combine_path(f, "../"), 0, id)) || -  (res = write_access(f, 0, id))) { +  mapping|int(0..1) res = write_access(combine_path(f, "../"), 0, id); +  if (mappingp(res) && (res->error == Protocols.HTTP.HTTP_PRECOND_FAILED)) { +  // NB: Preconditions in the If-header don't apply to the directory. +  res = 0; +  } +  if (res || (res = write_access(f, 0, id))) {    SIMPLE_TRACE_LEAVE("DELETE: Write access denied.");    return res;    }      #if 0    report_notice(LOCALE(49,"DELETING the file %s.\n"),f);   #endif       accesses++;