# header handling is kinda fugly, but it works.
bucket="${2:+/${2}}/" # slashify the bucket
remote="$(urlenc "${3}")" # if you don't, strange things may happen.
stdopts="--connect-timeout 10 --fail --silent"
[[ $CURL_S3_DEBUG == true ]] && stdopts="${stdopts} --show-error --fail"
# header handling is kinda fugly, but it works.
bucket="${2:+/${2}}/" # slashify the bucket
remote="$(urlenc "${3}")" # if you don't, strange things may happen.
stdopts="--connect-timeout 10 --fail --silent"
[[ $CURL_S3_DEBUG == true ]] && stdopts="${stdopts} --show-error --fail"