From 404175ada21a27547dd761c8c62d76bb9f94c04a Mon Sep 17 00:00:00 2001 From: Stoiko Ivanov Date: Thu, 21 Feb 2019 10:35:11 +0100 Subject: [PATCH] Don't override explicit $nocomp with default 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 --- PVE/APIServer/AnyEvent.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/APIServer/AnyEvent.pm b/PVE/APIServer/AnyEvent.pm index 277a1ec..502b824 100755 --- a/PVE/APIServer/AnyEvent.pm +++ b/PVE/APIServer/AnyEvent.pm @@ -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;