Skip to content

Commit

Permalink
Remove deprecated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Scavo committed Jan 14, 2017
1 parent 838d078 commit 17a0b8f
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions lib/http_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -538,28 +538,3 @@ percent_decode () {

printf '%b' "${1//%/\\x}"
}

# DEPRECATED: Use percent_encode and percent_decode instead.
#
# URL encoder/decoder
# see: https://gist.github.com/cdown/1163649
url_encode () {
local c
local l=${#1}

for (( i = 0 ; i < l ; i++ )); do
c=${1:i:1}
case "$c" in
[a-zA-Z0-9.~_-]) printf "$c" ;;
' ') printf + ;;
*) printf '%%%X' "'$c"
esac
done

return 0
}
url_decode () {
local data=${1//+/ }
printf '%b' "${data//%/\x}"
}

0 comments on commit 17a0b8f

Please sign in to comment.