]> git.99rst.org Git - git.git/commitdiff
http-backend: remove a duplicated code branch
authorRobin Dupret <redacted>
Sun, 24 Oct 2021 16:28:59 +0000 (18:28 +0200)
committerJunio C Hamano <redacted>
Mon, 25 Oct 2021 15:56:01 +0000 (08:56 -0700)
Try to make reading the computation of the gzipped flag a bit more
natural.

Signed-off-by: Robin Dupret <redacted>
Signed-off-by: Junio C Hamano <redacted>
http-backend.c

index e7c0eeab2308f14c589c54bcbb81bed1176d93b6..3d6e2ff17f83c7c5d1fd42578f9dc073686becab 100644 (file)
@@ -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)
git clone https://git.99rst.org/PROJECT