From c4670ac63db5b4496bb5d2f6795d7b99af57a762 Mon Sep 17 00:00:00 2001 From: clsr Date: Tue, 21 Jun 2016 16:34:16 +0200 Subject: Prefer --upload-host for generated --upload-url --- main.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/main.go b/main.go index 6e4b0f6..5f2d2f2 100644 --- a/main.go +++ b/main.go @@ -97,16 +97,16 @@ func main() { } if uploadUrl == "" { - if *listenHttps != "" { - if uploadHost != "" { + if uploadHost != "" { + if *listenHttps != "" { uploadUrl = "https://" + uploadHost + "/" - } else { - uploadUrl = "https://" + *listenHttps + "/u/" - } - } else if *listenHttp != "" { - if uploadHost != "" { + } else if *listenHttp != "" { uploadUrl = "http://" + uploadHost + "/" - } else { + } + } else { + if *listenHttps != "" { + uploadUrl = "https://" + *listenHttps + "/u/" + } else if *listenHttp != "" { uploadUrl = "http://" + *listenHttp + "/u/" } } -- cgit