From 12144e8f02094eaca371b5363db438b3c4691e18 Mon Sep 17 00:00:00 2001 From: Robin Dupret Date: Sun, 24 Oct 2021 18:28:59 +0200 Subject: 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 Signed-off-by: Junio C Hamano diff --git a/http-backend.c b/http-backend.c index e7c0eea..3d6e2ff 100644 --- a/http-backend.c +++ b/http-backend.c @@ -466,9 +466,7 @@ static void run_service(const char **argv, int buffer_input) struct child_process cld = CHILD_PROCESS_INIT; ssize_t req_len = get_content_length(); - if (encoding && !strcmp(encoding, "gzip")) - gzipped_request = 1; - else if (encoding && !strcmp(encoding, "x-gzip")) + if (encoding && (!strcmp(encoding, "gzip") || !strcmp(encoding, "x-gzip"))) gzipped_request = 1; if (!user || !*user) -- cgit v0.10.2-6-g49f6