Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/http.h
diff options
context:
space:
mode:
authorLi Linchao <lilinchao@oschina.cn>2022-07-11 08:58:54 +0300
committerJunio C Hamano <gitster@pobox.com>2022-07-11 22:24:28 +0300
commitb0c4adcdd7e339110bea8da94d7880d413e49330 (patch)
tree3554a2e0abcefedb309d3d0a2ade3a898c704001 /http.h
parent1e59178e3f65880188caedb965e70db5ceeb2d64 (diff)
remote-curl: send Accept-Language header to server
Git server end's ability to accept Accept-Language header was introduced in f18604bbf2 (http: add Accept-Language header if possible, 2015-01-28), but this is only used by very early phase of the transfer, which is HTTP GET request to discover references. For other phases, like POST request in the smart HTTP, the server does not know what language the client speaks. Teach git client to learn end-user's preferred language and throw accept-language header to the server side. Once the server gets this header, it has the ability to talk to end-user with language they understand. This would be very helpful for many non-English speakers. Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Li Linchao <lilinchao@oschina.cn> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.h')
-rw-r--r--http.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/http.h b/http.h
index ba303cfb37..3c94c47910 100644
--- a/http.h
+++ b/http.h
@@ -178,6 +178,9 @@ int http_fetch_ref(const char *base, struct ref *ref);
int http_get_info_packs(const char *base_url,
struct packed_git **packs_head);
+/* Helper for getting Accept-Language header */
+const char *http_get_accept_language_header(void);
+
struct http_pack_request {
char *url;