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
This commit is contained in:
4
http.c
4
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);
|
||||
|
Reference in New Issue
Block a user