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

version» Context lines:

Roxen.git/server/modules/filesystems/filesystem.pike:1007:    // RFC 2518 8.3.1:    // If a server receives a MKCOL request entity type it does not support    // or understand it MUST respond with a 415 (Unsupported Media Type)    // status code.    SIMPLE_TRACE_LEAVE ("MKCOL failed since the request has content.");    return Roxen.http_status(415, "Unsupported media type.");    }    /* FALL_THROUGH */    case "MKDIR":   #if 1 -  return make_collection(f, id); +  mixed ret = make_collection(f, id); +  if (ret) return ret; +  if (id->misc->error_code) { +  return Roxen.http_status(id->misc->error_code); +  } +  return 0;   #else /* !1 */    if(!query("put"))    {    id->misc->error_code = 405;    TRACE_LEAVE(sprintf("%s disallowed (since PUT is disallowed)",    id->method));    return 0;    }       if (FILTER_INTERNAL_FILE (f, id)) {
Roxen.git/server/modules/filesystems/filesystem.pike:1167:    /* Clear the stat-cache for this file */    if (stat_cache) {    cache_set("stat_cache", norm_f, 0);    }       if(!to->open(norm_f, "wct", 0666))    {    int err = to->errno();    privs = 0;    TRACE_LEAVE("PUT: Open failed"); -  return errno_to_status (err, 1, id); +  mixed ret = errno_to_status (err, 1, id); +  if (ret) return ret; +  if (id->misc->error_code) { +  return Roxen.http_status(id->misc->error_code);    } -  +  return 0; +  }       // FIXME: Race-condition.    string msg = safe_chmod(norm_f, 0666 & ~(id->misc->umask || 022));    privs = 0;       Stdio.File my_fd = id->connection();       putting[my_fd] = id->misc->len;    if(strlen(id->data))    {
Roxen.git/server/modules/filesystems/filesystem.pike:1481:       /* Clear the stat-cache for this file */    if (stat_cache) {    cache_set("stat_cache", new_uri, 0);    cache_set("stat_cache", f, 0);    }       if(!code)    {    SIMPLE_TRACE_LEAVE("MOVE: Move failed (%s)", strerror (err_code)); -  return errno_to_status (err_code, 1, id); +  mixed ret = errno_to_status (err_code, 1, id); +  if (ret) return ret; +  if (id->misc->error_code) { +  return Roxen.http_status(id->misc->error_code);    } -  +  return 0; +  }    TRACE_LEAVE("MOVE: Success");    TRACE_LEAVE("Success");    if (size != -1) return Roxen.http_status(204);    return Roxen.http_status(201);    }       case "DELETE":    if (size==-1) {    id->misc->error_code = 404;    TRACE_LEAVE("DELETE: Not found");