Bash script now correctly puts 2 parts.
So what triggered the previous error was an invalid range. What remains weird is why a failed PUT would still be retrievable
This commit is contained in:
parent
d4718fc6f0
commit
f67ce78c4d
|
@ -23,6 +23,7 @@ ${SERVICE}/files |awk -F': ' '/^Location/ {print $2}' |tr -d '\r')
|
||||||
# `tr -d '\r'` is required or location will have one in it ---^
|
# `tr -d '\r'` is required or location will have one in it ---^
|
||||||
echo "<-- Location: ${location}"
|
echo "<-- Location: ${location}"
|
||||||
|
|
||||||
|
|
||||||
# PUT some data
|
# PUT some data
|
||||||
echo -ne "PUT '${SERVICE}${location}' \t\t"
|
echo -ne "PUT '${SERVICE}${location}' \t\t"
|
||||||
status=$(curl -s \
|
status=$(curl -s \
|
||||||
|
@ -45,17 +46,13 @@ has_content=$(curl -s ${SERVICE}${location})
|
||||||
echo "<-- ${has_content}"
|
echo "<-- ${has_content}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# PUT some data
|
# PUT some data
|
||||||
echo -ne "PUT '${SERVICE}${location}' \t\t"
|
echo -ne "PUT '${SERVICE}${location}' \t\t"
|
||||||
status=$(curl -s \
|
status=$(curl -s \
|
||||||
--include \
|
--include \
|
||||||
--request PUT \
|
--request PUT \
|
||||||
--header 'Content-Length: 3' \
|
--header 'Content-Length: 3' \
|
||||||
--header 'Content-Range: bytes 22-25/26' \
|
--header 'Content-Range: bytes 23-25/26' \
|
||||||
--data 'xyz' \
|
--data 'xyz' \
|
||||||
${SERVICE}${location} |head -1 |tr -d '\r')
|
${SERVICE}${location} |head -1 |tr -d '\r')
|
||||||
echo "<-- ${status}"
|
echo "<-- ${status}"
|
||||||
|
|
Loading…
Reference in New Issue