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.134 2003/06/02 12:06:31 grubba Exp $ + // $Id: module.pike,v 1.135 2003/06/11 15:48: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:300:      //! Returns a multiset with the names off all supported properties.   multiset(string) query_all_properties(string path, RequestID id)   {    Stat st = stat_file(path, id);    if (!st) return (<>);    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    >);    }    return res;   }   
Roxen.git/server/base_server/module.pike:340:    break;    case "DAV:getcontenttype": // 13.5    if (st->isreg) {    return id->conf->    type_from_filename(path, 0,    lower_case(Roxen.extension(path, id)));    }    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 "DAV:collection": // MacOS X mount_webdav uses this. +  if (st->isdir) { +  return ""; +  } +  break;    default:    break;    }    return 0; // FIXME: No such property.   }      //! Attempt to set property @[prop_name] for @[path] to @[value].   //!   //! @param value   //! Value to set the node to.