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.
165
2004/04/28
16
:
30
:
55
grubba
Exp $
+
// $Id: module.pike,v 1.
166
2004/04/28
17
:
52
:
43
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:300:
if (!id->misc->common) id->misc->common = ([]); RequestID sub_id = id->clone_me(); sub_id->misc->common = id->misc->common; sub_id->not_query = query_location() + path; sub_id->raw_url = replace (id->raw_url, id->not_query, sub_id->not_query); sub_id->method = "HEAD";
-
mapping(string:mixed)|int(-1..
-1
)|object res = find_file (path, sub_id);
+
mapping(string:mixed)|int(-1..
0
)|object res = find_file (path, sub_id);
if (res == -1) res = ([]); else if (objectp (res)) { string ext; if(stringp(sub_id->extension)) { sub_id->not_query += sub_id->extension; ext = lower_case(Roxen.extension(sub_id->not_query, sub_id)); } array(string) tmp=sub_id->conf->type_from_filename(sub_id->not_query, 1, ext); if(tmp) res = ([ "file":res, "type":tmp[0], "encoding":tmp[1] ]);
Roxen.git/server/base_server/module.pike:349:
} PropertySet res = DefaultPropertySet(path, st, id); SIMPLE_TRACE_LEAVE (""); return res; } //! Returns the value of the specified property, or an error code //! mapping. //!
-
//! @param st
-
//! If set, this should be the stat that corresponds to @[path]. Its
-
//! only purpose is to save a call to @[stat_file] when the stat
-
//! already has been retrieved.
-
//!
+
//! @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) { mapping(string:mixed)|PropertySet properties = query_properties(path, id); if (!properties) { return Roxen.http_status(Protocols.HTTP.HTTP_NOT_FOUND, "No such file or directory.");
Roxen.git/server/base_server/module.pike:546:
result = properties->remove_property(prop_name); if (result && result->error >= 300) { properties->unroll(); return result; } properties->commit(); return 0; }
+
#if 0
//! Mapping from canonical path to a mapping from username to //! the locks that apply to the path. //! //! The @expr{0@} username is the anonymous user. static mapping(string:mapping(string:DAVLock)) file_locks = ([]); //! Mapping from canonical path prefix to a set of locks that apply //! recursively to all files under that prefix. //! //! The @expr{0@} username is the anonymous user.
Roxen.git/server/base_server/module.pike:748:
DAVLock|mapping(string:mixed) lock_file(string path, string locktype, string lockscope, string locktoken, int(0..1) recursive, string user, RequestID id) { return 0; }
+
#endif
mapping(string:mixed)|int(-1..0)|Stdio.File find_file(string path, RequestID id); //! Delete the file specified by @[path]. //! //! @note //! Should return a 204 status on success. //! //! @note