[pve-devel] [PATCH http-server] fix #1869: send correct http response in spice proxy

Dominik Csapak d.csapak at proxmox.com
Thu Aug 16 14:48:12 CEST 2018


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 at proxmox.com>
---
 PVE/APIServer/AnyEvent.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/PVE/APIServer/AnyEvent.pm b/PVE/APIServer/AnyEvent.pm
index 190471a..54e1db8 100755
--- a/PVE/APIServer/AnyEvent.pm
+++ b/PVE/APIServer/AnyEvent.pm
@@ -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
-- 
2.11.0





More information about the pve-devel mailing list