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.137 2003/06/16 15:35:11 grubba Exp $ + // $Id: module.pike,v 1.138 2003/06/16 16:07:25 grubba 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:306:    multiset(string) res = (<    "DAV:creationdate", // 13.1    "DAV:displayname", // 13.2    "DAV:getlastmodified", // 13.7    "DAV:resourcetype", // 13.9    >);    if (st->isreg) {    res += (<    "DAV:getcontentlength", // 13.4    "DAV:getcontenttype", // 13.5 +  "http://apache.org/dav/props/executable",    >);    }    return res;   }      //! Returns the value of the specified property, or an error code   //! mapping.   //!   //! @note   //! Returning a string is shorthand for returning an array
Roxen.git/server/base_server/module.pike:348:    break;    case "DAV:getlastmodified": // 13.7    return iso8601_date_time(st->mtime);    case "DAV:resourcetype": // 13.9    if (st->isdir) {    return ({ Parser.XML.Tree.Node(Parser.XML.Tree.XML_ELEMENT,    "DAV:collection", ([]), 0,    "DAV:collection") }); // 12.2    }    return ""; +  case "http://apache.org/dav/props/executable": +  // http://www.webdav.org/mod_dav/: +  // +  // Name: executable +  // Namespace: http://apache.org/dav/props/ +  // Purpose: Describes the executable status of the resource. +  // Value: "T" | "F" (case is significant) +  // Description: This property is defined by mod_dav's default +  // repository, the "filesystem" repository. It +  // corresponds to the "executable" permission flag +  // in most filesystems. +  // +  // This property is not defined on collections. +  if (st->isreg) { +  if (o->mode & 0111) return "T"; +  return "F"; +  } +  break;    default:    break;    }    // RFC 2518 8.1:    // A request to retrieve the value of a property which does not    // exist is an error and MUST be noted, if the response uses a    // multistatus XML element, with a response XML element which    // contains a 404 (Not Found) status value.    return Roxen.http_low_answer(404, "No such property.");   }
Roxen.git/server/base_server/module.pike:383:   //!   //! @note   //! Overloaded variants should only set live properties;   //! setting of dead properties should be done throuh   //! overloading of @[set_dead_property()].   mapping(string:mixed) set_property(string path, string prop_name,    string|array(Parser.XML.Tree.Node) value,    RequestID id)   {    switch(prop_name) { +  case "http://apache.org/dav/props/executable": +  // FIXME: Could probably be implemented R/W. +  // FALL_THROUGH    case "DAV:creationdate": // 13.1    case "DAV:displayname": // 13.2    case "DAV:getcontentlength": // 13.4    case "DAV:getcontenttype": // 13.5    case "DAV:getlastmodified": // 13.7    return Roxen.http_low_answer(409,    "Attempt to set read-only property.");    }    return set_dead_property(path, prop_name, value, id);   }