Skip to content
This repository

Perform HEAD instead of GET for HEAD #12

Merged
1 commit merged into from over 3 years ago

2 participants

Matt Stevens Micha Niskin
Matt Stevens

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

Micha Niskin
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

Showing 1 unique commit by 1 author.

Jan 19, 2011
Matt Stevens mattstevens Perform HEAD instead of GET for HEAD 41b4e3d
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  resty
2  resty
@@ -63,7 +63,7 @@ function resty() {
63 63 [ -n "$dat" ] && [ "$dat" != "@-" ] && shift
64 64 [ "$1" = "-Z" ] && raw="yes" && shift
65 65 [ -n "$dat" ] && opt="--data-binary"
66   - [ "$method" = "HEAD" ] && method="GET" && opt="-I" && raw="yes"
  66 + [ "$method" = "HEAD" ] && opt="-I" && raw="yes"
67 67 [ "$method" = "OPTIONS" ] && opt="-I" && raw="yes"
68 68 eval "args2=( $(cat "$confdir/$domain" 2>/dev/null |sed 's/^ *//' |grep ^$method |cut -b $((${#method}+2))-) )"
69 69 res=$((((curl -sLv $opt "$dat" -X $method \

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.