diff --git a/include/consts b/include/consts index 84d982cd..59a94649 100644 --- a/include/consts +++ b/include/consts @@ -60,7 +60,7 @@ unset LANG COMPLIANCE_ENABLE_PCI_DSS=0 COMPLIANCE_TESTS_PERFORMED=0 COMPLIANCE_FINDINGS_FOUND=0 - COMPRESSED_UPLOADS=1 + COMPRESSED_UPLOADS=0 CONTROL_URL_APPEND="" CONTROL_URL_PREPEND="" CSUMBINARY="" diff --git a/include/data_upload b/include/data_upload index 66e8f938..b8e7b88c 100644 --- a/include/data_upload +++ b/include/data_upload @@ -137,12 +137,13 @@ output "Settings file: ${SETTINGS_FILE}" output "${WHITE}Found hostid: ${HOSTID}${NORMAL}" # Try to connect output "Uploading data.." - logtext "Command used: ${CURLBINARY} ${CURL_OPTIONS} -s -S --data-urlencode \"data@${REPORTFILE}\" --data-urlencode \"licensekey=${LICENSE_KEY}\" --data-urlencode \"hostid=${HOSTID}\" ${UPLOAD_URL}" # Add a space CURL_OPTIONS=" ${CURL_OPTIONS}" + # Currently compressed uploads are not supported yet on central node. Therefore default value is set to 0. if [ ${COMPRESSED_UPLOADS} -eq 1 ]; then - CURL_OPTIONS="${CURL_OPTIONS} --compressed" + CURL_OPTIONS="${CURL_OPTIONS} --compressed -H 'Content-Encoding: gzip'" fi + logtext "Command used: ${CURLBINARY}${CURL_OPTIONS} -s -S --data-urlencode \"data@${REPORTFILE}\" --data-urlencode \"licensekey=${LICENSE_KEY}\" --data-urlencode \"hostid=${HOSTID}\" ${UPLOAD_URL}" UPLOAD=`${CURLBINARY}${CURL_OPTIONS} -s -S --data-urlencode "data@${REPORTFILE}" --data-urlencode "licensekey=${LICENSE_KEY}" --data-urlencode "hostid=${HOSTID}" ${UPLOAD_URL} 2> /dev/null` EXITCODE=$? if [ ${EXITCODE} -gt 0 ]; then diff --git a/include/profiles b/include/profiles index 5a7dd29e..c7ba7ab9 100644 --- a/include/profiles +++ b/include/profiles @@ -175,7 +175,7 @@ # Compression of uploads (enabled by default) upload_compressed) - if [ "${VALUE}" = "0" ]; then COMPRESSED_UPLOADS=1 ]; fi + if [ "${VALUE}" = "0" ]; then COMPRESSED_UPLOADS=0; fi ;; # Options during upload of data