Example #1
0
/* Implements the #merge_server_config method of Apache's #module vtable. */
static void *
merge_server_config(apr_pool_t *p, void *base, void *overrides)
{
  server_conf_t *parent = base;
  server_conf_t *child = overrides;
  server_conf_t *newconf;

  newconf = apr_pcalloc(p, sizeof(*newconf));

  newconf->special_uri = INHERIT_VALUE(parent, child, special_uri);

  return newconf;
}
Example #2
0
/* Implements the #merge_server_config method of Apache's #module vtable. */
static void *
merge_server_config(apr_pool_t *p, void *base, void *overrides)
{
  server_conf_t *parent = base;
  server_conf_t *child = overrides;
  server_conf_t *newconf;

  newconf = apr_pcalloc(p, sizeof(*newconf));

  newconf->special_uri = INHERIT_VALUE(parent, child, special_uri);

  if (child->compression_level < 0)
    {
      /* Inherit compression level from parent if not configured for this
         VirtualHost. */
      newconf->compression_level = parent->compression_level;
    }
  else
    {
      newconf->compression_level = child->compression_level;
    }

  return newconf;
}
Example #3
0
/* Implements the #merge_dir_config method of Apache's #module vtable. */
static void *
merge_dir_config(apr_pool_t *p, void *base, void *overrides)
{
  dir_conf_t *parent = base;
  dir_conf_t *child = overrides;
  dir_conf_t *newconf;

  newconf = apr_pcalloc(p, sizeof(*newconf));

  newconf->fs_path = INHERIT_VALUE(parent, child, fs_path);
  newconf->master_uri = INHERIT_VALUE(parent, child, master_uri);
  newconf->master_version = INHERIT_VALUE(parent, child, master_version);
  newconf->activities_db = INHERIT_VALUE(parent, child, activities_db);
  newconf->repo_name = INHERIT_VALUE(parent, child, repo_name);
  newconf->xslt_uri = INHERIT_VALUE(parent, child, xslt_uri);
  newconf->fs_parent_path = INHERIT_VALUE(parent, child, fs_parent_path);
  newconf->autoversioning = INHERIT_VALUE(parent, child, autoversioning);
  newconf->bulk_updates = INHERIT_VALUE(parent, child, bulk_updates);
  newconf->v2_protocol = INHERIT_VALUE(parent, child, v2_protocol);
  newconf->path_authz_method = INHERIT_VALUE(parent, child, path_authz_method);
  newconf->list_parentpath = INHERIT_VALUE(parent, child, list_parentpath);
  newconf->txdelta_cache = INHERIT_VALUE(parent, child, txdelta_cache);
  newconf->fulltext_cache = INHERIT_VALUE(parent, child, fulltext_cache);
  newconf->revprop_cache = INHERIT_VALUE(parent, child, revprop_cache);
  newconf->root_dir = INHERIT_VALUE(parent, child, root_dir);
  newconf->hooks_env = INHERIT_VALUE(parent, child, hooks_env);

  if (parent->fs_path)
    ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL,
                 "mod_dav_svn: nested Location '%s' hinders access to '%s' "
                 "in SVNPath Location '%s'",
                 child->root_dir,
                 svn_urlpath__skip_ancestor(parent->root_dir, child->root_dir),
                 parent->root_dir);

  return newconf;
}
Example #4
0
static void *
merge_dir_config(apr_pool_t *p, void *base, void *overrides)
{
  dir_conf_t *parent = base;
  dir_conf_t *child = overrides;
  dir_conf_t *newconf;

  newconf = apr_pcalloc(p, sizeof(*newconf));

  newconf->fs_path = INHERIT_VALUE(parent, child, fs_path);
  newconf->master_uri = INHERIT_VALUE(parent, child, master_uri);
  newconf->activities_db = INHERIT_VALUE(parent, child, activities_db);
  newconf->repo_name = INHERIT_VALUE(parent, child, repo_name);
  newconf->xslt_uri = INHERIT_VALUE(parent, child, xslt_uri);
  newconf->fs_parent_path = INHERIT_VALUE(parent, child, fs_parent_path);
  newconf->autoversioning = INHERIT_VALUE(parent, child, autoversioning);
  newconf->bulk_updates = INHERIT_VALUE(parent, child, bulk_updates);
  newconf->path_authz_method = INHERIT_VALUE(parent, child, path_authz_method);
  newconf->list_parentpath = INHERIT_VALUE(parent, child, list_parentpath);
  /* Prefer our parent's value over our new one - hence the swap. */
  newconf->root_dir = INHERIT_VALUE(child, parent, root_dir);

  return newconf;
}