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

version» Context lines:

Roxen.git/server/modules/filesystems/filesystem.pike:1:   // This is a roxen module. Copyright © 1996 - 2001, Roxen IS.      // This is a virtual "file-system".   // It will be located somewhere in the name-space of the server.   // Also inherited by some of the other filesystems.      inherit "module";   inherit "socket";    - constant cvs_version= "$Id: filesystem.pike,v 1.123 2003/12/23 12:14:24 grubba Exp $"; + constant cvs_version= "$Id: filesystem.pike,v 1.124 2003/12/29 12:14:33 grubba Exp $";   constant thread_safe=1;      #include <module.h>   #include <roxen.h>   #include <stat.h>   #include <request_trace.h>         //<locale-token project="mod_filesystem">LOCALE</locale-token>   #define LOCALE(X,Y) _DEF_LOCALE("mod_filesystem",X,Y)
Roxen.git/server/modules/filesystems/filesystem.pike:1144:    TRACE_LEAVE("MOVE: Move failed");    TRACE_LEAVE("Failure");    return 0;    }    TRACE_LEAVE("MOVE: Success");    TRACE_LEAVE("Success");    return Roxen.http_string_answer("Ok");          case "DELETE": +  if (size==-1) { +  id->misc->error_code = 404; +  TRACE_LEAVE("DELETE: Not found"); +  return 0; +  }    if(!query("delete"))    {    id->misc->error_code = 405;    TRACE_LEAVE("DELETE: Disabled");    return 0;    } -  if (size==-1) { -  id->misc->error_code = 404; -  TRACE_LEAVE("DELETE: Not found"); -  return 0; -  } +        if (FILTER_INTERNAL_FILE (f, id)) {    id->misc->error_code = 405;    TRACE_LEAVE("DELETE of internal file is disallowed");    return 0;    }       if(query("check_auth") && (!id->conf->authenticate( id ) ) ) {    TRACE_LEAVE("DELETE: Permission denied");    return http_low_answer(403, "<h1>Permission to DELETE file denied</h1>");
Roxen.git/server/modules/filesystems/filesystem.pike:1242:    deletes++;       if (id->misc->quota_obj && (size > 0)) {    id->misc->quota_obj->deallocate(oldf, size);    }    }    TRACE_LEAVE("DELETE: Success");    return http_low_answer(204,(f+" DELETED from the server"));       default: +  id->misc->error_code = 501;    TRACE_LEAVE("Not supported");    return 0;    }    TRACE_LEAVE("Not reached");    return 0;   }      string query_name()   {    if (sizeof(path) > 20) {    return sprintf((string)LOCALE(63,"%s from %s...%s"),    mountpoint, path[..7], path[sizeof(path)-8..]);    }    return sprintf((string)LOCALE(50,"%s from %s"), mountpoint, path);   }