Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Perform HEAD instead of GET for HEAD #12

Merged
1 commit merged into from

2 participants

@mattstevens

HEAD requests are sometimes handled differently from GETs so the distinction can be important.

@micha
Owner

Thanks! You're right about that. I merged your version into master. I don't remember why I did it that way.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 19, 2011
  1. @mattstevens
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  resty
View
2  resty
@@ -63,7 +63,7 @@ function resty() {
[ -n "$dat" ] && [ "$dat" != "@-" ] && shift
[ "$1" = "-Z" ] && raw="yes" && shift
[ -n "$dat" ] && opt="--data-binary"
- [ "$method" = "HEAD" ] && method="GET" && opt="-I" && raw="yes"
+ [ "$method" = "HEAD" ] && opt="-I" && raw="yes"
[ "$method" = "OPTIONS" ] && opt="-I" && raw="yes"
eval "args2=( $(cat "$confdir/$domain" 2>/dev/null |sed 's/^ *//' |grep ^$method |cut -b $((${#method}+2))-) )"
res=$((((curl -sLv $opt "$dat" -X $method \
Something went wrong with that request. Please try again.