]> git.proxmox.com Git - pve-http-server.git/commitdiff
Don't override explicit $nocomp with default
authorStoiko Ivanov <s.ivanov@proxmox.com>
Thu, 21 Feb 2019 09:35:11 +0000 (10:35 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 21 Feb 2019 09:40:16 +0000 (10:40 +0100)
By making compression configurable the $nocomp flag in response got set to
the configured (or default) setting, irrespective of the explicitly passed
value to response.

This broke (e.g.) noVNC connections

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
PVE/APIServer/AnyEvent.pm

index 277a1ec34778c47eb519b87996cbf3fa2315b882..502b8245a9c7c4f4c2304637c3958c48b679c553 100755 (executable)
@@ -184,7 +184,7 @@ sub response {
     $reqstate->{hdl}->timeout_reset();
     $reqstate->{hdl}->timeout($self->{timeout});
 
-    $nocomp = !$self->{compression};
+    $nocomp //= !$self->{compression};
     $nocomp = 1 if !$reqstate->{accept_gzip};
 
     my $code = $resp->code;