+
+ return path;
+}
+
+static APR_INLINE void domaintree_fake(apr_pool_t *pool, MOD_DT_CNF *DT, char **path)
+{
+ int more;
+ apr_hash_index_t *idx;
+ size_t recurlevel = 0;
+
+ do {
+ more = 0;
+
+ if (recurlevel++ > DT->aliases.recursion) {
+ DT_LOG_ERR
+ "DomainTree: maximum alias recursion level (%d) exceeded! "
+ "Check if you have recursive definitions of DomainTreeAlias directives.",
+ DT->aliases.recursion
+ DT_LOG_END
+ break;
+ }
+
+ for (idx = apr_hash_first(pool, DT->aliases.hashtable); idx; idx = apr_hash_next(idx)) {
+ char *fake, *real, *begin, *end;
+
+ apr_hash_this(idx, (const void **) &fake, NULL, (void **) &real);
+
+ DT_LOG_DBG
+ "DomainTree: fake test %s on %s", fake, *path
+ DT_LOG_END
+
+ if (strmatch(fake, *path, &begin, &end)) {
+ *path = apr_pstrcat(pool, "/", apr_pstrndup(pool, *path, begin - *path), "/", real, "/", end, NULL);
+ struniqchr(*path, '/');
+
+ DT_LOG_DBG
+ "DomainTree: fake done %s<>%s = %s", fake, real, *path
+ DT_LOG_END
+
+ more = 1;
+ }
+ }
+ } while (more && DT->aliases.recursion);