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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robin Dupret <robin.dupret@xxxxxxxxx> writes:

> Try to make reading the computation of the gzipped flag a bit more
> natural.

... and did you succeed? ;-)

We are all imperfect human and anything we do is merely "trying to",
so let's not say "try to", unless the change is so involved that it
is hard to judge if the result has succeeded in trying.

Did you mean to send the same patch text (but with an updated log
message)?  Just making sure.

Thanks; will queue.

> Signed-off-by: Robin Dupret <robin.dupret@xxxxxxx>
> ---
>  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)



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux