Roxen.git / server / etc / modules / PropertySet.pike

version» Context lines:

Roxen.git/server/etc/modules/PropertySet.pike:57:   // Simulate an import of useful stuff from Parser.XML.Tree.   protected constant SimpleNode = Parser.XML.Tree.SimpleNode;   protected constant SimpleElementNode = Parser.XML.Tree.SimpleElementNode;      private constant all_properties_common = (<    "DAV:getcontentlength",    "DAV:getcontenttype",    "DAV:displayname",    "DAV:resourcetype",    "DAV:supportedlock", -  "DAV:iscollection", -  "DAV:isfolder", +     "DAV:lockdiscovery",    "DAV:supportedlock", -  +  +  // Microsoft extension from draft-ietf-dasl-protocol-00.txt +  // Note that it hijacks some of the DAV: namespace. +  // See also https://greenbytes.de/tech/webdav/webdavfaq.html +  "DAV:iscollection", +  +  // Microsoft extensions from draft-hoppmann-collection-props-00.txt +  // Note that these hijack some of the DAV: namespace. +  // See also https://greenbytes.de/tech/webdav/webdavfaq.html +  "DAV:isfolder", +  "DAV:ishidden",   >);      private constant all_properties_file = all_properties_common + (<    "http://apache.org/dav/props/executable",   >);      private constant all_properties_dir = all_properties_common;      //! Returns a multiset with the names of all supported properties.   //!
Roxen.git/server/etc/modules/PropertySet.pike:82:   //! Only properties that should be listed by @tt{<DAV:allprop/>@}   //! are returned.   //!   //! @note   //! The following properties are required to keep   //! @tt{Microsoft Data Access Internet Publishing Provider DAV 1.1@}   //! as supplied with @tt{Microsoft Windows 2000@} happy:   //!   //! @string   //! @value "DAV:creationdate" - //! RFC2518 13.1 + //! @rfc{2518:13.1@}   //!   //! @value "DAV:displayname" - //! RFC2518 13.2 + //! @rfc{2518:13.2@}   //!   //! @value "DAV:getcontentlanguage" - //! RFC2518 13.3 + //! @rfc{2518:13.3@}   //!   //! @value "DAV:getcontentlength" - //! RFC2518 13.4 + //! @rfc{2518:13.4@}   //!   //! @value "DAV:getcontenttype" - //! RFC2518 13.5 + //! @rfc{2518:13.5@}   //!   //! @value "DAV:getetag" - //! RFC2518 13.6 + //! @rfc{2518:13.6@}   //!   //! @value "DAV:getlastmodified" - //! RFC2518 13.7 + //! @rfc{2518:13.7@}   //!   //! @value "DAV:lockdiscovery" - //! RFC2518 13.8 + //! @rfc{2518:13.8@}   //!   //! @value "DAV:resourcetype" - //! RFC2518 13.9 + //! @rfc{2518:13.9@}   //!   //! @value "DAV:supportedlock" - //! RFC2518 13.11 + //! @rfc{2518:13.11@}   //!   //! @value "DAV:defaultdocument"   //! @tt{draft-hopmann-collection-props-00@} 1.3   //!   //! Specifies the default document for a collection.   //!   //! This property contains an URL that identifies the default   //! document for a collection. This is intended for collection   //! owners to be able to set a default document, for example   //! @tt{index.html@} or @tt{default.html@}. If this property
Roxen.git/server/etc/modules/PropertySet.pike:259:    if (hdrs["Last-Modified"]) props["DAV:getlastmodified"] = 1;    return props;    }    // Null resource.    return all_properties_common + (<>);   }      //! Returns the value of the specified property, or an error code   //! mapping.   //! - //! The default implementation takes care of the most important RFC - //! 2518 properties. + //! The default implementation takes care of the most important + //! @rfc{2518@} properties.   //!   //! @note   //! Returning a string is shorthand for returning an array   //! with a single text node.   string|array(SimpleNode)|mapping(string:mixed)    query_property(string prop_name)   {    switch(prop_name) {   #if 0    // We don't really have any idea of the creation time in a unix
Roxen.git/server/etc/modules/PropertySet.pike:356:    return "F";    }    break;      #if 0    // Need more interaction with directory listing modules to handle    // this.    case "DAV:defaultdocument": // draft-hopmann-collection-props-00 1.3    return "";    -  // Absence means not hidden. -  case "DAV:ishidden": // draft-hopmann-collection-props-00 1.6 -  return "0"; -  +     // Absence means not a structured document.    case "DAV:isstructureddocument": // draft-hopmann-collection-props-00 1.7    return "0";   #endif    -  +  case "DAV:ishidden": // draft-hopmann-collection-props-00 1.6 +  if ((has_suffix(path, "/") && has_prefix(basename(dirname(path)), ".")) || +  has_prefix(basename(path), ".")) { +  return "1"; +  } +  return "0"; +     case "DAV:iscollection": // draft-ietf-dasl-protocol-00 5.18    case "DAV:isfolder": // draft-hopmann-collection-props-00 1.5    if ((get_stat()||([]))->isdir) {    return "1";    }    return "0";      #if 0    // The following are properties in the DAV namespace    // that Microsoft has stolen.