]> git.proxmox.com Git - pve-http-server.git/blobdiff - PVE/APIServer/AnyEvent.pm
do not send websocket status code to port
[pve-http-server.git] / PVE / APIServer / AnyEvent.pm
index ef0417ce63991911b5464185981b92bda3aca8da..494c659addc73301f3931528553729b38bd09425 100755 (executable)
@@ -287,6 +287,7 @@ my $file_extension_info = {
     epub  => { ct => 'application/epub+zip', nocomp => 1},
     mp3   => { ct => 'audio/mpeg', nocomp => 1},
     oga   => { ct => 'audio/ogg', nocomp => 1},
+    tgz   => { ct => 'application/x-compressed-tar', nocomp => 1},
 };
 
 sub send_file_start {
@@ -483,9 +484,9 @@ sub websocket_proxy {
                if ($opcode == 1 || $opcode == 2) {
                    $reqstate->{proxyhdl}->push_write($payload) if $reqstate->{proxyhdl};
                } elsif ($opcode == 8) {
-                   print "websocket received close\n" if $self->{debug};
+                   my $statuscode = unpack ("n", $payload);
+                   print "websocket received close. status code: '$statuscode'\n" if $self->{debug};
                    if ($reqstate->{proxyhdl}) {
-                       $reqstate->{proxyhdl}->push_write($payload);
                        $reqstate->{proxyhdl}->push_shutdown();
                    }
                    $hdl->push_shutdown();