Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Dupret <robin.dupret@gmail.com>2021-10-24 19:28:59 +0300
committerJunio C Hamano <gitster@pobox.com>2021-10-25 18:56:01 +0300
commit12144e8f02094eaca371b5363db438b3c4691e18 (patch)
treeb13f7010fd20f48542af26041b574a5a17073bf1 /http-backend.c
parent9d530dc0024503ab4218fe6c4395b8a0aa245478 (diff)
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>
Diffstat (limited to 'http-backend.c')
-rw-r--r--http-backend.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/http-backend.c b/http-backend.c
index e7c0eeab23..3d6e2ff17f 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)