From 2c3a7e8c75d90091c06a82e315ca22dbd918c5be Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 10 Mar 2016 13:41:02 +0000 Subject: Fix `brew update` user agent. This needs to be `Homebrew $HOMEBREW_VERSION` so we can be adequately filtered. Closes Homebrew/homebrew#49961. Signed-off-by: Mike McQuaid --- Library/Homebrew/cmd/update.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Library/Homebrew/cmd') 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 -- cgit v1.2.3