Set HTTP user agent to git/GIT_VERSION

Useful for diagnostics/troubleshooting to know which client versions are
hitting your server.

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Nick Hengeveld
2006-04-04 10:11:29 -07:00
committed by Junio C Hamano
parent 7fa8ddd6e2
commit 20fc9bc5e4
2 changed files with 5 additions and 0 deletions

2
http.c
View File

@ -195,6 +195,8 @@ static CURL* get_curl_handle(void)
if (getenv("GIT_CURL_VERBOSE"))
curl_easy_setopt(result, CURLOPT_VERBOSE, 1);
curl_easy_setopt(result, CURLOPT_USERAGENT, GIT_USER_AGENT);
return result;
}