]> git.proxmox.com Git - pve-http-server.git/commitdiff
fix #1869: send correct http response in spice proxy
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 16 Aug 2018 12:48:12 +0000 (14:48 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 17 Aug 2018 06:28:36 +0000 (08:28 +0200)
the glib implementation of the http proxy correctly checks the
http response (response code, followed by an empty line)
so we need to answer with the correct status

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

index 190471a61a1fa1eb01eb96bb8456156baaae2a11..54e1db8fbdac0fb85e6a5882326ca75242ce9850 100755 (executable)
@@ -867,7 +867,8 @@ sub handle_spice_proxy_request {
 
                # todo: use stop_read/start_read if write buffer grows to much
 
-               my $res = "$proto 200 OK\015\012"; # hope this is the right answer?
+               # a response must be followed by an empty line
+               my $res = "$proto 200 OK\015\012\015\012";
                $reqstate->{hdl}->push_write($res);
 
                # log early