From f67ce78c4d75e86afc400c8e102542f61e3cf312 Mon Sep 17 00:00:00 2001 From: Kevin van Zonneveld Date: Wed, 20 Mar 2013 17:53:45 +0100 Subject: [PATCH] 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 --- scripts/demo-alphabet.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/demo-alphabet.sh b/scripts/demo-alphabet.sh index 22e2c4e..cbbdbd8 100755 --- a/scripts/demo-alphabet.sh +++ b/scripts/demo-alphabet.sh @@ -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 ---^ echo "<-- Location: ${location}" + # PUT some data echo -ne "PUT '${SERVICE}${location}' \t\t" status=$(curl -s \ @@ -45,17 +46,13 @@ has_content=$(curl -s ${SERVICE}${location}) echo "<-- ${has_content}" - - - - # PUT some data echo -ne "PUT '${SERVICE}${location}' \t\t" status=$(curl -s \ --include \ --request PUT \ --header 'Content-Length: 3' \ - --header 'Content-Range: bytes 22-25/26' \ + --header 'Content-Range: bytes 23-25/26' \ --data 'xyz' \ ${SERVICE}${location} |head -1 |tr -d '\r') echo "<-- ${status}"