Commit 76cef29b authored by Dietmar Maurer's avatar Dietmar Maurer

bump version to 3.1-44, re-add spiceconfig support

parent 1d4b0dfb
...@@ -48,7 +48,7 @@ my $baseuri = "/api2"; ...@@ -48,7 +48,7 @@ my $baseuri = "/api2";
sub split_abs_uri { sub split_abs_uri {
my ($abs_uri) = @_; my ($abs_uri) = @_;
my ($format, $rel_uri) = $abs_uri =~ m/^\Q$baseuri\E\/+(html|text|json|extjs|png|htmljs)(\/.*)?$/; my ($format, $rel_uri) = $abs_uri =~ m/^\Q$baseuri\E\/+(html|text|json|extjs|png|htmljs|spiceconfig)(\/.*)?$/;
$rel_uri = '/' if !$rel_uri; $rel_uri = '/' if !$rel_uri;
return wantarray ? ($rel_uri, $format) : $rel_uri; return wantarray ? ($rel_uri, $format) : $rel_uri;
......
...@@ -111,6 +111,14 @@ sub format_response_data { ...@@ -111,6 +111,14 @@ sub format_response_data {
# we use this for extjs file upload forms # we use this for extjs file upload forms
$ct = 'text/html;charset=UTF-8'; $ct = 'text/html;charset=UTF-8';
$raw = encode_entities(to_json($data, {allow_nonref => 1})); $raw = encode_entities(to_json($data, {allow_nonref => 1}));
} elsif ($format eq 'spiceconfig') {
$ct = 'application/x-virt-viewer;charset=UTF-8';
if ($data && ref($data) && ref($data->{data})) {
$raw = "[virt-viewer]\n";
while (my ($key, $value) = each %{$data->{data}}) {
$raw .= "$key=$value\n" if defined($value);
}
}
} else { } else {
$ct = 'text/plain;charset=UTF-8'; $ct = 'text/plain;charset=UTF-8';
$raw = to_json($data, {utf8 => 1, allow_nonref => 1, pretty => 1}); $raw = to_json($data, {utf8 => 1, allow_nonref => 1, pretty => 1});
......
pve-manager (3.1-44) unstable; urgency=low
* re-add support for spiceconfig output format (revert commit
97da4646288d2806c334c6a1c1361acb22df0535 and commit
b96fb2234a7df02999489cc1f33ad52defac8998)
-- Proxmox Support Team <support@proxmox.com> Mon, 24 Feb 2014 12:49:35 +0100
pve-manager (3.1-43) unstable; urgency=low pve-manager (3.1-43) unstable; urgency=low
* fix network API (make comments optional) * fix network API (make comments optional)
......
...@@ -2,7 +2,7 @@ RELEASE=3.1 ...@@ -2,7 +2,7 @@ RELEASE=3.1
VERSION=3.1 VERSION=3.1
PACKAGE=pve-manager PACKAGE=pve-manager
PACKAGERELEASE=43 PACKAGERELEASE=44
BINDIR=${DESTDIR}/usr/bin BINDIR=${DESTDIR}/usr/bin
PERLLIBDIR=${DESTDIR}/usr/share/perl5 PERLLIBDIR=${DESTDIR}/usr/share/perl5
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment