From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 21B111FF37F for ; Thu, 18 Apr 2024 10:43:08 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id CC4BC1739C; Thu, 18 Apr 2024 10:43:07 +0200 (CEST) Message-ID: <5f511147-7dee-4f2f-be6b-e31240e70f73@proxmox.com> Date: Thu, 18 Apr 2024 10:43:04 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox VE development discussion , Maximiliano Sandoval References: <20240417113129.318431-1-m.sandoval@proxmox.com> Content-Language: en-US From: Friedrich Weber In-Reply-To: <20240417113129.318431-1-m.sandoval@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL -0.065 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH http-server v2] http: support Content-Encoding=deflate X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" On 17/04/2024 13:31, Maximiliano Sandoval wrote: > [...] > - $headers->{'Accept-Encoding'} = 'gzip' if ($reqstate->{accept_gzip} && $self->{compression}); > + if ($self->{compression}) { > + if ($reqstate->{accept_deflate} && $reqstate->{accept_gzip}) { > + $headers->{'Accept-Encoding'} = 'gzip, deflate' if $reqstate->{accept_deflate}; Isn't this post-if redundant because we only enter the block if $reqstate->{accept_deflate}? > + } elsif ($reqstate->{accept_gzip}) { > + $headers->{'Accept-Encoding'} = 'gzip' if $reqstate->{accept_gzip}; same here? > + } elsif ($reqstate->{accept_deflate}) { > + $headers->{'Accept-Encoding'} = 'deflate' if $reqstate->{accept_gzip}; > + } Is this correct (accept_deflate in the elsif, accept_gzip in the post-if)? Do we need a post-if here? _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel