Skip to content

Commit 12144e8

Browse files
robin850gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9d530dc commit 12144e8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

http-backend.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,7 @@ static void run_service(const char **argv, int buffer_input)
466466
struct child_process cld = CHILD_PROCESS_INIT;
467467
ssize_t req_len = get_content_length();
468468

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")))
472470
gzipped_request = 1;
473471

474472
if (!user || !*user)

0 commit comments

Comments
 (0)