-if [ -n "${CONTENT_LENGTH}" -a "${CONTENT_LENGTH}" -gt 0 ]; then
-(head -c "${CONTENT_LENGTH}"; echo)|sed 's/&/\n/g' |while read line; do
- if (echo "${line}" | egrep -xq 'text=.+'); then
- text="$(cut -d= -f2- <<<"${line}" |sed 's/+/ /g;s/%/\\x/g')"
- text=$(echo -e "${text}" |sed 's/\t/ /g;s/\r//g;s/\\/\\\\/g')
- elif (echo "${line}" | egrep -xq 'cancel=.+'); then
- cancel=true
- fi
-done
-fi