From: Nick Hengeveld <nickh@reactrix•com>
To: git@vger•kernel.org
Subject: [PATCH] Set HTTP user agent to git/GIT_VERSION
Date: Tue, 4 Apr 2006 10:11:29 -0700 [thread overview]
Message-ID: <20060404171128.GD14967@reactrix.com> (raw)
Useful for diagnostics/troubleshooting to know which client versions are
hitting your server.
Signed-off-by: Nick Hengeveld <nickh@reactrix•com>
---
Makefile | 3 +++
http.c | 2 ++
2 files changed, 5 insertions(+), 0 deletions(-)
468d4d4ac3cbdb0757a7cc1c207ca379ce3a5d56
diff --git a/Makefile b/Makefile
index 19ce42c..c7d5ecf 100644
--- a/Makefile
+++ b/Makefile
@@ -510,6 +510,9 @@ git$X git.spec \
exec_cmd.o: exec_cmd.c
$(CC) -o $*.o -c $(ALL_CFLAGS) '-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' $<
+http.o: http.c
+ $(CC) -o $*.o -c $(ALL_CFLAGS) -DGIT_USER_AGENT='"git/$(GIT_VERSION)"' $<
+
ifdef NO_EXPAT
http-fetch.o: http-fetch.c
$(CC) -o $*.o -c $(ALL_CFLAGS) -DNO_EXPAT $<
diff --git a/http.c b/http.c
index 9604e33..0cb42a8 100644
--- a/http.c
+++ b/http.c
@@ -195,6 +195,8 @@ #endif
if (getenv("GIT_CURL_VERBOSE"))
curl_easy_setopt(result, CURLOPT_VERBOSE, 1);
+ curl_easy_setopt(result, CURLOPT_USERAGENT, GIT_USER_AGENT);
+
return result;
}
--
1.3.0.rc1.g9aef-dirty
reply other threads:[~2006-04-04 17:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060404171128.GD14967@reactrix.com \
--to=nickh@reactrix$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox