-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mod_dav_svn: Use mod_dav's DAVBasePath setting #28
base: trunk
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -781,6 +781,15 @@ const char * | |
dav_svn__get_root_dir(request_rec *r) | ||
{ | ||
dir_conf_t *conf; | ||
const char *base; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any particular reason why base isn't declared within the #if block? If compiled with < 20211221.28, there is a compiler warning about an unused variable. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks good catch! |
||
#if AP_MODULE_MAGIC_AT_LEAST(20211221, 28) | ||
/* Inherit the root path from mod_dav's DavBasePath iff configured | ||
where e.g. LocationMatch is used for the repos. */ | ||
base = dav_get_base_path(r); | ||
if (base) | ||
return base; | ||
#endif | ||
|
||
conf = ap_get_module_config(r->per_dir_config, &dav_svn_module); | ||
return conf->root_dir; | ||
|
@@ -1225,7 +1234,7 @@ static int dav_svn__translate_name(request_rec *r) | |
else | ||
{ | ||
/* Retrieve path to repo and within repo for the request */ | ||
dav_error *err = dav_svn_split_uri(r, r->uri, conf->root_dir, | ||
dav_error *err = dav_svn_split_uri(r, r->uri, dav_svn__get_root_dir(r), | ||
&ignore_cleaned_uri, | ||
&ignore_had_slash, &repos_basename, | ||
&ignore_relative_path, &repos_path); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already added something very similar in r1923964/r1923965, didn't notice this was already included in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah great, looks perfect.