Roxen.git
/
server
/
base_server
/
module.pike
version
»
Context lines:
10
20
40
80
file
none
3
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.
140
2003/
06
/
17
12
:
41
:
55
grubba
Exp $
+
// $Id: module.pike,v 1.
141
2003/
07
/
07
17:
44
:
58
mast
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:297:
1900 + gmt->year, gmt->mon, gmt->mday, gmt->hour, gmt->min, gmt->sec); } //! 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 "http://apache.org/dav/props/executable", >);
Roxen.git/server/base_server/module.pike:324:
//! //! @note //! Returning a string is shorthand for returning an array //! with a single text node. string|array(Parser.XML.Tree.Node)|mapping(string:mixed) query_property(string path, string prop_name, RequestID id) { Stat st = stat_file(path, id); if (!st) return Roxen.http_low_answer(404, "No such file or directory."); switch(prop_name) {
-
case "DAV:creationdate": // 13.1
-
return iso8601_date_time(st->ctime);
+
case "DAV:displayname": // 13.2 return combine_path(query_location(), path); case "DAV:getcontentlength": // 13.4 if (st->isreg) { return (string)st->size; } break; case "DAV:getcontenttype": // 13.5 if (st->isreg) { return id->conf->
Roxen.git/server/base_server/module.pike:405:
//! 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); }
Roxen.git/server/base_server/module.pike:457:
//! //! @returns //! Returns a result mapping. May return @expr{0@} (zero) on success. //! //! @note //! The default implementation does not support deletion. mapping(string:mixed) remove_property(string path, string prop_name, RequestID id) { switch(prop_name) {
-
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 remove a read-only property."); } return Roxen.http_low_answer(404, "Attempt to remove an unknown property."); }