aboutsummaryrefslogtreecommitdiff
path: root/src/mod_http_upload.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mod_http_upload.erl')
-rw-r--r--src/mod_http_upload.erl14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/mod_http_upload.erl b/src/mod_http_upload.erl
index 43a1999e1..65251e056 100644
--- a/src/mod_http_upload.erl
+++ b/src/mod_http_upload.erl
@@ -178,18 +178,14 @@ mod_opt_type(dir_mode) ->
mod_opt_type(docroot) ->
fun iolist_to_binary/1;
mod_opt_type(put_url) ->
- fun(<<"http://", _/binary>> = URL) -> URL;
- (<<"https://", _/binary>> = URL) -> URL
- end;
+ fun misc:try_url/1;
mod_opt_type(get_url) ->
- fun(<<"http://", _/binary>> = URL) -> URL;
- (<<"https://", _/binary>> = URL) -> URL;
- (undefined) -> undefined
+ fun(undefined) -> undefined;
+ (URL) -> misc:try_url(URL)
end;
mod_opt_type(service_url) ->
- fun(<<"http://", _/binary>> = URL) -> URL;
- (<<"https://", _/binary>> = URL) -> URL;
- (undefined) -> undefined
+ fun(undefined) -> undefined;
+ (URL) -> misc:try_url(URL)
end;
mod_opt_type(custom_headers) ->
fun(Headers) ->