2
* mod_dav_svn.h: public header for the DAV/SVN Apache module
4
* ====================================================================
5
* Copyright (c) 2000-2004 CollabNet. All rights reserved.
7
* This software is licensed as described in the file COPYING, which
8
* you should have received as part of this distribution. The terms
9
* are also available at http://subversion.tigris.org/license-1.html.
10
* If newer versions of this license are posted there, you may use a
11
* newer version instead, at your option.
13
* This software consists of voluntary contributions made by many
14
* individuals. For exact contribution history, see the revision
15
* history and logs, available at http://subversion.tigris.org/.
16
* ====================================================================
29
#endif /* __cplusplus */
32
/* Given an apache request R, a URI, and a ROOT_PATH to the svn
33
location block, process URI and return many things, allocated in
36
* CLEANED_URI: the uri with duplicate and trailing slashes removed.
38
* TRAILING_SLASH: Whether the uri had a trailing slash on it.
40
Three special substrings of the uri are returned for convenience:
42
* REPOS_NAME: The single path component that is the directory
43
which contains the repository.
45
* RELATIVE_PATH: The remaining imaginary path components.
47
* REPOS_PATH: The actual path within the repository filesystem, or
48
NULL if no part of the uri refers to a path in
49
the repository. (e.g. "!svn/vcc/default" or
53
So for example, consider the uri
55
/svn/repos/proj1/!svn/blah/13//A/B/alpha
57
In the SVNPath case, this function would receive a ROOT_PATH of
58
'/svn/repos/proj1', and in the SVNParentPath case would receive a
59
ROOT_PATH of '/svn/repos'. But either way, we would get back:
61
* CLEANED_URI: /svn/repos/proj1/!svn/blah/13/A/B/alpha
63
* RELATIVE_PATH: /!svn/blah/13/A/B/alpha
64
* REPOS_PATH: A/B/alpha
65
* TRAILING_SLASH: FALSE
67
AP_MODULE_DECLARE(dav_error *) dav_svn_split_uri(request_rec *r,
69
const char *root_path,
70
const char **cleaned_uri,
72
const char **repos_name,
73
const char **relative_path,
74
const char **repos_path);
77
/* Given an apache request R and a ROOT_PATH to the svn location
78
block sets *REPOS_PATH to the path of the repository on disk.
80
AP_MODULE_DECLARE(dav_error *) dav_svn_get_repos_path(request_rec *r,
81
const char *root_path,
82
const char **repos_path);
86
#endif /* __cplusplus */
88
#endif /* MOD_DAV_SVN_H */