From 6ba12bb9ae77c60653969b6bc999d6be739f7685 Mon Sep 17 00:00:00 2001 From: Kayou Date: Sat, 9 Feb 2019 23:04:21 +0100 Subject: [PATCH 1/3] Fix ynh_local_curl --- data/helpers.d/utils | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/data/helpers.d/utils b/data/helpers.d/utils index 360174847..94ba8bd97 100644 --- a/data/helpers.d/utils +++ b/data/helpers.d/utils @@ -257,7 +257,15 @@ ynh_setup_source () { # | arg: ... - (Optionnal) More POST keys and values ynh_local_curl () { # Define url of page to curl - local full_page_url=https://localhost$path_url$1 + path_url=$(ynh_normalize_url_path $path_url) + local_page=$(ynh_normalize_url_path $1) + full_path=$path_url$local_page + + if [ "${path_url}" == "/" ]; then + full_path=$local_page + fi + + local full_page_url=https://localhost$full_path # Concatenate all other arguments with '&' to prepare POST data local POST_data="" From a0dfae269f2d1c6f570d55cdeef2d8a495a73a59 Mon Sep 17 00:00:00 2001 From: Kayou Date: Sat, 9 Feb 2019 23:13:48 +0100 Subject: [PATCH 2/3] Update utils --- data/helpers.d/utils | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/helpers.d/utils b/data/helpers.d/utils index 94ba8bd97..40bef7b88 100644 --- a/data/helpers.d/utils +++ b/data/helpers.d/utils @@ -258,8 +258,8 @@ ynh_setup_source () { ynh_local_curl () { # Define url of page to curl path_url=$(ynh_normalize_url_path $path_url) - local_page=$(ynh_normalize_url_path $1) - full_path=$path_url$local_page + local local_page=$(ynh_normalize_url_path $1) + local full_path=$path_url$local_page if [ "${path_url}" == "/" ]; then full_path=$local_page From b6c5b1fce933847a3a29e7e26c747792271b13b6 Mon Sep 17 00:00:00 2001 From: Kayou Date: Mon, 11 Feb 2019 16:45:40 +0100 Subject: [PATCH 3/3] Don't normilize path_url --- data/helpers.d/utils | 1 - 1 file changed, 1 deletion(-) diff --git a/data/helpers.d/utils b/data/helpers.d/utils index 40bef7b88..5ba2946a2 100644 --- a/data/helpers.d/utils +++ b/data/helpers.d/utils @@ -257,7 +257,6 @@ ynh_setup_source () { # | arg: ... - (Optionnal) More POST keys and values ynh_local_curl () { # Define url of page to curl - path_url=$(ynh_normalize_url_path $path_url) local local_page=$(ynh_normalize_url_path $1) local full_path=$path_url$local_page