mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-03-14 21:20:28 +01:00
Fix upload error with extra header
This commit is contained in:
parent
3ed615d839
commit
4e82190d88
1 changed files with 2 additions and 2 deletions
|
|
@ -94,13 +94,13 @@ upload_launch() {
|
|||
rx_bytes_start=$(ubus call network.device status "{'name':'$device'}" | jsonfilter -e @.statistics.rx_bytes)
|
||||
|
||||
time_start=$(date +"%s.282646") # It should be like that time_start=$(date +"%s.%6N") but since OpenWrt busybox has limitations and doesn't support nonoseconds so keep it hardcoded
|
||||
res=$(dd if=/dev/zero bs=$bs count=$count 2>/dev/null | curl ${ip_proto} --fail --silent --max-time ${UPLOAD_TIMEOUT} -T - ${url} -w "${format}")
|
||||
res=$(dd if=/dev/zero bs=$bs count=$count 2>/dev/null | curl ${ip_proto} --fail --silent --max-time ${UPLOAD_TIMEOUT} -T - ${url} -w "${format}"|grep -wo '{.*}')
|
||||
time_end=$(date +"%s.282646") # It should be like that time_end=$(date +"%s.%6N") but since OpenWrt busybox has limitations and doesn't support nonoseconds so keep it hardcoded
|
||||
|
||||
tx_bytes_end=$(ubus call network.device status "{'name':'$device'}" | jsonfilter -e @.statistics.tx_bytes)
|
||||
rx_bytes_end=$(ubus call network.device status "{'name':'$device'}" | jsonfilter -e @.statistics.rx_bytes)
|
||||
|
||||
logger -t "bbf_upload" "########### ${url} ==> ${res} ###########"
|
||||
logger -t "bbf_upload" "# ${url} => ${res} #"
|
||||
json_load "${res}"
|
||||
json_get_var size_upload size_upload
|
||||
json_get_var time_appconnect time_appconnect
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue