summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-11-04 19:07:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-11-04 19:07:46 (GMT)
commitada03fcbeb67001cf2a0b99755472cf49aa8159d (patch)
treee5722ec74b539de6216bbbd59c6b4abbe48eed03
parent2b647089bab2fd41cdf90f728d8860f71218ddab (diff)
parent12144e8f02094eaca371b5363db438b3c4691e18 (diff)
downloadgit-ada03fcbeb67001cf2a0b99755472cf49aa8159d.zip
git-ada03fcbeb67001cf2a0b99755472cf49aa8159d.tar.gz
git-ada03fcbeb67001cf2a0b99755472cf49aa8159d.tar.bz2
Merge branch 'rd/http-backend-code-simplification'
Code simplification. * rd/http-backend-code-simplification: http-backend: remove a duplicated code branch
-rw-r--r--http-backend.c4
1 files changed, 1 insertions, 3 deletions
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)