summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-07-19 23:40:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-07-19 23:40:19 (GMT)
commit4b8cdff8baa44c97a784d5b4b6c5a9df37de41ff (patch)
tree5df6944aaee80778b5445c3fad9a01385692cb98 /http.c
parent7c683389d689c85e66d9c2ce1fba198da4325e3a (diff)
parentb0c4adcdd7e339110bea8da94d7880d413e49330 (diff)
downloadgit-4b8cdff8baa44c97a784d5b4b6c5a9df37de41ff.zip
git-4b8cdff8baa44c97a784d5b4b6c5a9df37de41ff.tar.gz
git-4b8cdff8baa44c97a784d5b4b6c5a9df37de41ff.tar.bz2
Merge branch 'll/curl-accept-language'
Earlier, HTTP transport clients learned to tell the server side what locale they are in by sending Accept-Language HTTP header, but this was done only for some requests but not others. * ll/curl-accept-language: remote-curl: send Accept-Language header to server
Diffstat (limited to 'http.c')
-rw-r--r--http.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/http.c b/http.c
index 168ca30..5d0502f 100644
--- a/http.c
+++ b/http.c
@@ -1775,7 +1775,7 @@ static void write_accept_language(struct strbuf *buf)
* LANGUAGE= LANG=en_US.UTF-8 -> "Accept-Language: en-US, *; q=0.1"
* LANGUAGE= LANG=C -> ""
*/
-static const char *get_accept_language(void)
+const char *http_get_accept_language_header(void)
{
if (!cached_accept_language) {
struct strbuf buf = STRBUF_INIT;
@@ -1829,7 +1829,7 @@ static int http_request(const char *url,
fwrite_buffer);
}
- accept_language = get_accept_language();
+ accept_language = http_get_accept_language_header();
if (accept_language)
headers = curl_slist_append(headers, accept_language);