]> git.proxmox.com Git - pve-http-server.git/commitdiff
fix #1935: read empty line after 200 OK
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 28 Sep 2018 07:36:39 +0000 (09:36 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 28 Sep 2018 07:40:15 +0000 (09:40 +0200)
commit a4d8bbafbe400be78bebeab169963025dc46e29b
introduced an additional empty line after '200 OK'
for remote-viewer 7 to work, but we also have to read this line
in our own proxy reader else the connection to a remote node does
not work

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/APIServer/AnyEvent.pm

index 54e1db8fbdac0fb85e6a5882326ca75242ce9850..14e46fa0cdf6e7bb4347c9182616b83a30e094f3 100755 (executable)
@@ -890,7 +890,10 @@ sub handle_spice_proxy_request {
                    my ($hdl, $line) = @_;
 
                    if ($line =~ m!^$proto 200 OK$!) {
-                       &$startproxy();
+                       # read the empty line after the 200 OK
+                       $reqstate->{proxyhdl}->unshift_read(line => sub{
+                           &$startproxy();
+                       });
                    } else {
                        $reqstate->{hdl}->push_write($line);
                        $self->client_do_disconnect($reqstate);