[pve-devel] applied: [PATCH http-server] fix #1935: read empty line after 200 OK

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Sep 28 10:40:38 CEST 2018


On 9/28/18 9:36 AM, Dominik Csapak wrote:
> 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 at proxmox.com>
> ---
>  PVE/APIServer/AnyEvent.pm | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/PVE/APIServer/AnyEvent.pm b/PVE/APIServer/AnyEvent.pm
> index 54e1db8..14e46fa 100755
> --- a/PVE/APIServer/AnyEvent.pm
> +++ b/PVE/APIServer/AnyEvent.pm
> @@ -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);
> 

applied. Single possible issue is if the proxying node has this version
and another node has a http-server version older than the commit introducing
this. But that is unlikely and we do not support that. Just to note that.

thanks for finding and fixing!




More information about the pve-devel mailing list