http-backend: remove a duplicated code branch

Try to make reading the computation of the gzipped flag a bit more natural. Signed-off-by: Robin Dupret <robin.dupret@hey.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Robin Dupret committed Oct 24, 2021 at 18:28 UTC 12144e8f02094eaca371b5363db438b3c4691e18
1 file changed +1 -3
http-backend.c
+1 -3
@@ -466,9 +466,7 @@ static void run_service(const char **argv, int buffer_input)
466 struct child_process cld = CHILD_PROCESS_INIT;
467 ssize_t req_len = get_content_length();
468
469 - if (encoding && !strcmp(encoding, "gzip"))
470 - gzipped_request = 1;
471 - else if (encoding && !strcmp(encoding, "x-gzip"))
469 + if (encoding && (!strcmp(encoding, "gzip") || !strcmp(encoding, "x-gzip")))
470 gzipped_request = 1;
471
472 if (!user || !*user)