aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/update.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh
index 13bce9909..49df783f2 100644
--- a/Library/Homebrew/cmd/update.sh
+++ b/Library/Homebrew/cmd/update.sh
@@ -342,8 +342,9 @@ EOS
# (so the API does not return 304: unmodified).
UPSTREAM_SHA_HTTP_CODE="$(curl --silent '--max-time' 3 \
--output /dev/null --write-out "%{http_code}" \
- -H "Accept: application/vnd.github.chitauri-preview+sha" \
- -H "If-None-Match: \"$UPSTREAM_BRANCH_LOCAL_SHA\"" \
+ --user-agent "Homebrew $HOMEBREW_VERSION" \
+ --header "Accept: application/vnd.github.chitauri-preview+sha" \
+ --header "If-None-Match: \"$UPSTREAM_BRANCH_LOCAL_SHA\"" \
"https://api.github.com/repos/$UPSTREAM_REPOSITORY/commits/$UPSTREAM_BRANCH")"
[[ "$UPSTREAM_SHA_HTTP_CODE" = "304" ]] && exit
fi