[pve-devel] [PATCH http-server] Don't override explicit $nocomp with default

Stoiko Ivanov s.ivanov at proxmox.com
Thu Feb 21 10:35:11 CET 2019


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 at proxmox.com>
---
TIL: curl and testssl.sh don't give the complete picture about the working of
a webinterface... - sorry!
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;
-- 
2.11.0





More information about the pve-devel mailing list