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.135 2004/05/10 18:39:55 grubba Exp $"; + constant cvs_version= "$Id: filesystem.pike,v 1.136 2004/05/10 21:38:45 mast 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:820:    {    if( id->set_output_charset )    id->set_output_charset( charset, 2 );    id->misc->input_charset = charset;    }    return o;    }    break;       case "MKCOL": -  if (id->request_headers["content-type"]) { +  if (id->request_headers["content-type"] || sizeof (id->data)) {    // 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. -  TRACE_LEAVE(sprintf("MKCOL failed, since the content-type is %O.", -  id->request_headers["content-type"])); -  return http_low_answer(415, -  "<h2>Unsupported media type.</h2>"); +  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(oldf, id);   #else /* !1 */    if(!query("put"))    {    id->misc->error_code = 405;    TRACE_LEAVE(sprintf("%s disallowed (since PUT is disallowed)",
Roxen.git/server/modules/filesystems/filesystem.pike:1056:    return 0;    }       if(query("check_auth") && (!id->conf->authenticate( id ) ) ) {    TRACE_LEAVE("CHMOD: Permission denied");    return Roxen.http_auth_required("foo",    "<h1>Permission to 'CHMOD' files denied</h1>");    }       if (mapping(string:mixed) ret = write_access(oldf, 0, id)) { -  TRACE_LEAVE("PUT: Locked"); +  TRACE_LEAVE("CHMOD: Locked");    return ret;    }       SETUID_TRACE("CHMODing file", 0);       if (query("no_symlinks") && (contains_symlinks(path, oldf))) {    privs = 0;    errors++;    TRACE_LEAVE("CHMOD: Contains symlinks. Permission denied");    return http_low_answer(403, "<h2>Permission denied.</h2>");
Roxen.git/server/modules/filesystems/filesystem.pike:1271:    if(!query("delete"))    {    privs = 0;    id->misc->error_code = 405;    TRACE_LEAVE("MOVE disallowed (DELE disabled)");    return 0;    }       if ((overwrite == DO_OVERWRITE) || (size > -1)) {    mapping(string:mixed) res = -  recurse_delete_files(new_uri, -  id->get_multi_status()-> -  prefix(id->url_base() + mountpoint[1..]), id); +  recurse_delete_files(new_uri, id);    if (res && res->error >= 300) {    privs = 0;    TRACE_LEAVE("MOVE: Recursive delete failed.");    return Roxen.http_status(412);    }    } else {    privs = 0;    TRACE_LEAVE("MOVE: Cannot overwrite directory");    return Roxen.http_status(412);    }