From a00090086e12d7e474b64b8a9ad4a3afabc68cea Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Sun, 23 Aug 2015 19:37:09 +0200 Subject: [PATCH] mod_http_upload: Omit expansion for "service_url" Don't expand the @HOST@ keyword within the "service_url" value, after all. The code didn't cope with an undefined "service_url", and the @HOST@ expansion probably isn't too useful there, anyway. --- mod_http_upload/README.txt | 6 ++---- mod_http_upload/src/mod_http_upload.erl | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/mod_http_upload/README.txt b/mod_http_upload/README.txt index 27895f6..2055d44 100644 --- a/mod_http_upload/README.txt +++ b/mod_http_upload/README.txt @@ -104,10 +104,8 @@ The configurable mod_http_upload options are: If a 'service_url' is specified, HTTP upload slot requests are forwarded to this external service instead of being handled by mod_http_upload - itself. The keyword @HOST@ is replaced with the virtual host name. - - An HTTP GET query such as the following is issued whenever an HTTP upload - slot request is accepted as per the 'access' rule: + itself. An HTTP GET query such as the following is issued whenever an + HTTP upload slot request is accepted as per the 'access' rule: http://localhost:5444/?jid=juliet%40example.com&size=10240&name=example.jpg diff --git a/mod_http_upload/src/mod_http_upload.erl b/mod_http_upload/src/mod_http_upload.erl index 0d1948b..013a7db 100644 --- a/mod_http_upload/src/mod_http_upload.erl +++ b/mod_http_upload/src/mod_http_upload.erl @@ -246,7 +246,7 @@ init({ServerHost, Opts}) -> docroot = expand_home(str:strip(DocRoot, right, $/)), put_url = expand_host(str:strip(PutURL, right, $/), ServerHost), get_url = expand_host(str:strip(GetURL, right, $/), ServerHost), - service_url = expand_host(ServiceURL, ServerHost)}}. + service_url = ServiceURL}}. -spec handle_call(_, {pid(), _}, state()) -> {noreply, state()}.