Not sure if being more strict adds much more value here in practice though. So it may be fine to keep it as-is. :) > num_langs++; > REALLOC_ARRAY(language_tags, num_langs); > language_tags[num_langs - 1] = strbuf_detach(&tag, NULL); > diff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh > index 538b603f03..96a6833e67 100755 > --- a/t/t5541-http-push-smart.sh > +++ b/t/t5541-http-push-smart.sh > @@ -86,6 +86,24 @@ test_expect_success 'push to remote repository (standard) with sending Accept-La > GIT_TRACE_CURL=true LANGUAGE="ko_KR.UTF-8" git push -v -v 2>err && > ! grep "Expect: 100-continue" err && > > + grep "=> Send header: Accept-Language:" err >err.language && > + test_cmp exp err.language && > + > + test_commit C-is-not-a-language && > + GIT_TRACE_CURL=true LANGUAGE="C" git push -v -v 2>err && > + > + ! grep "=> Send header: Accept-Language:" err >err.language && > + test_must_be_empty err.language && > + > + test_commit POSIX-is-not-a-language-either && > + GIT_TRACE_CURL=true LANGUAGE="POSIX" git push -v -v 2>err && > + > + ! grep "=> Send header: Accept-Language:" err >err.language && > + test_must_be_empty err.language && The above two tests demonstrate that the Accept-Language header is not sent if no valid languages are found. > + > + test_commit ignore-C-and-POSIX-as-languages-wherever-provided && > + GIT_TRACE_CURL=true LANGUAGE="C.UTF-8:ko_KR.UTF-8:POSIX" git push -v -v 2>err && > + > grep "=> Send header: Accept-Language:" err >err.language && > test_cmp exp err.language > ' And here we see only the valid languages sent in the header. Looks good! -Justin