aboutsummaryrefslogtreecommitdiff
path: root/src/mod_http_upload_quota.erl
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2016-02-20 20:13:30 +0100
committerHolger Weiss <holger@zedat.fu-berlin.de>2016-02-20 20:13:30 +0100
commit44f581c3b58b2b977480fdcee69236dd66df6f44 (patch)
tree56f712a368dd1fb5e82f629271a64e7a55fa40f3 /src/mod_http_upload_quota.erl
parentmod_http_upload: Expand 'docroot' before using it (diff)
mod_http_upload: Also expand @HOST@ in 'docroot'
In some environments, it might be desirable to use separate document roots for each virtual host.
Diffstat (limited to 'src/mod_http_upload_quota.erl')
-rw-r--r--src/mod_http_upload_quota.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mod_http_upload_quota.erl b/src/mod_http_upload_quota.erl
index db0b4aa4c..a5ae0c3cc 100644
--- a/src/mod_http_upload_quota.erl
+++ b/src/mod_http_upload_quota.erl
@@ -132,6 +132,7 @@ init({ServerHost, Opts}) ->
fun iolist_to_binary/1,
<<"@HOME@/upload">>),
DocRoot2 = mod_http_upload:expand_home(str:strip(DocRoot1, right, $/)),
+ DocRoot3 = mod_http_upload:expand_host(DocRoot2, ServerHost),
Timers = if MaxDays == infinity -> [];
true ->
{ok, T1} = timer:send_after(?INITIAL_TIMEOUT, sweep),
@@ -144,7 +145,7 @@ init({ServerHost, Opts}) ->
access_soft_quota = AccessSoftQuota,
access_hard_quota = AccessHardQuota,
max_days = MaxDays,
- docroot = DocRoot2,
+ docroot = DocRoot3,
timers = Timers}}.
-spec handle_call(_, {pid(), _}, state()) -> {noreply, state()}.