"Li Linchao via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes: > Range-diff vs v2: > > 1: a2dd9d4070e ! 1: 99a4e23ceb1 remote-curl: send Accept-Language header to server > @@ Commit message > 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), but this is > - only used by very early phase of the transfer, that's HTTP GET request to > - discover references. For other phases, like POST request in the smart HTTP > - the server side don't know what language the client speaks. > + 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. OK. > -+ accept_language = http_get_accept_language_header(); > -+ if (accept_language) { > -+ strbuf_addstr(&buf, accept_language); > -+ rpc->hdr_accept_language = strbuf_detach(&buf, NULL); > -+ } > ++ rpc->hdr_accept_language = xstrdup_or_null(http_get_accept_language_header()); Nice. > +@@ remote-curl.c: static int rpc_service(struct rpc_state *rpc, struct discovery *heads, > + free(rpc->service_url); > + free(rpc->hdr_content_type); > + free(rpc->hdr_accept); > ++ free(rpc->hdr_accept_language); > + free(rpc->protocol_header); > + free(rpc->buf); > + strbuf_release(&buf); OK. > +@@ remote-curl.c: static int stateless_connect(const char *service_name) > + free(rpc.service_url); > + free(rpc.hdr_content_type); > + free(rpc.hdr_accept); > ++ free(rpc.hdr_accept_language); > + free(rpc.protocol_header); > + free(rpc.buf); > + strbuf_release(&buf); OK. Thanks. Will queue.