Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes issue gh-26 where curl options were not being correctly passed …

…to curl for HEAD or OPTIONS requests
  • Loading branch information...
commit 58560a1161a0a31ea9263acdfbd16952757414bd 1 parent d64f241
@micha authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 resty
View
4 resty
@@ -46,8 +46,7 @@ function resty() {
([ "$i" = "--verbose" ] || echo "$i" | grep '^-[a-zA-Z]*v[a-zA-Z]*$' >/dev/null) \
&& verbose="yes" && continue
[ "$i" = "-V" ] && vimedit="yes" && continue
- [ "$i" = "-Z" ] || [ "$method" = "HEAD" ] || [ "$method" = "OPTIONS" ] \
- && raw="yes" && continue
+ [ "$i" = "-Z" ] && raw="yes" && continue
[ "$i" = "-W" ] && continue
[ "$i" = "-Q" ] && quote="yes" && continue
[ "$i" = "-q" ] && maybe_query="yes" && continue
@@ -56,6 +55,7 @@ function resty() {
[ -z "$quote" ] && _path=$(echo "$_path"|sed 's/%/%25/g;s/\[/%5B/g;s/\]/%5D/g;s/|/%7C/g;s/\$/%24/g;s/&/%26/g;s/+/%2B/g;s/,/%2C/g;s/:/%3A/g;s/;/%3B/g;s/=/%3D/g;s/?/%3F/g;s/@/%40/g;s/ /%20/g;s/#/%23/g;s/{/%7B/g;s/}/%7D/g;s/\\/%5C/g;s/\^/%5E/g;s/~/%7E/g;s/`/%60/g')
+ [ "$method" = "HEAD" ] || [ "$method" = "OPTIONS" ] && raw="yes"
[ -z "$_resty_host" ] && _resty_host=$(cat "$host" 2>/dev/null)
[ "$method" = "-v" ] && echo "$_resty_host $_resty_opts" && return
[ -z "$method" ] && echo "$_resty_host" && return
Please sign in to comment.
Something went wrong with that request. Please try again.