3 * ====================================================================
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
20 * ====================================================================
24 * @brief Subversion's backend for Apache's mod_dav module
37 #endif /* __cplusplus */
41 Given an apache request @a r, a @a uri, and a @a root_path to the svn
42 location block, process @a uri and return many things, allocated in
45 - @a cleaned_uri: The uri with duplicate and trailing slashes removed.
47 - @a trailing_slash: Whether the uri had a trailing slash on it.
49 Three special substrings of the uri are returned for convenience:
51 - @a repos_basename: The single path component that is the directory
52 which contains the repository. (Don't confuse
53 this with the "repository name" as optionally
54 defined via the SVNReposName directive!)
56 - @a relative_path: The remaining imaginary path components.
58 - @a repos_path: The actual path within the repository filesystem, or
59 NULL if no part of the uri refers to a path in
60 the repository (e.g. "!svn/vcc/default" or
64 For example, consider the uri
66 /svn/repos/proj1/!svn/blah/13//A/B/alpha
68 In the SVNPath case, this function would receive a @a root_path of
69 '/svn/repos/proj1', and in the SVNParentPath case would receive a
70 @a root_path of '/svn/repos'. But either way, we would get back:
72 - @a cleaned_uri: /svn/repos/proj1/!svn/blah/13/A/B/alpha
73 - @a repos_basename: proj1
74 - @a relative_path: /!svn/blah/13/A/B/alpha
75 - @a repos_path: A/B/alpha
76 - @a trailing_slash: FALSE
78 AP_MODULE_DECLARE(dav_error *) dav_svn_split_uri(request_rec *r,
80 const char *root_path,
81 const char **cleaned_uri,
83 const char **repos_basename,
84 const char **relative_path,
85 const char **repos_path);
89 * Given an apache request @a r and a @a root_path to the svn location
90 * block, set @a *repos_path to the path of the repository on disk. */
91 AP_MODULE_DECLARE(dav_error *) dav_svn_get_repos_path(request_rec *r,
92 const char *root_path,
93 const char **repos_path);
97 #endif /* __cplusplus */
99 #endif /* MOD_DAV_SVN_H */