Thread (4 messages) flat view 4 messages, 3 authors, 2021-10-12
STALE1776d

[PATCH] http-backend: remove a duplicated code branch

From: Robin Dupret <hidden>
Date: 2021-10-11 19:26:16
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Robin Dupret <redacted>
---
 http-backend.c | 4 +---
 1 file changed, 1 insertion(+), 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)
-- 
2.30.1 (Apple Git-130)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help