mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-07 19:42:17 +00:00
use multipart/form-data for compareServers script to avoid server warning about consumed request body
This commit is contained in:
1 parent
3be5e5e965
commit
8cb2adf98c
1 file changed
+1
-1
@@ -51,7 +51,7 @@ if [ "${useRestApi}" = "1" ]; then
|
||||
AUTH=""
|
||||
fi
|
||||
HEADERS=$( mktemp )
|
||||
CURL_OUTPUT=$( curl -sL --dump-header "${HEADERS}" "${NEWSERVER}/sailingserver/api/v1/compareservers" -d "server2=${OLDSERVER}" ${AUTH} 2>${WGET_ERR} )
|
||||
CURL_OUTPUT=$( curl -sL --dump-header "${HEADERS}" -H 'Content-Type: multipart/form-data' "${NEWSERVER}/sailingserver/api/v1/compareservers" -d "server2=${OLDSERVER}" ${AUTH} 2>${WGET_ERR} )
|
||||
echo "${CURL_OUTPUT}" | jq
|
||||
HTTP_STATUS=$( cat "${HEADERS}" | grep "^HTTP\/[0-9.]* [0-9]\{3\}" | tail -1 | sed -e 's/^HTTP\/[0-9.]* \([0-9]\{3\}\).*$/\1/' )
|
||||
rm -f "${HEADERS}"
|
||||
|
||||
Reference in new issue
Block a user