Bug 1152319: calling /rest/logout results in an internal error and a malformed response to the caller
r=glob,a=glob git-svn-id: svn://10.0.0.236/trunk@265917 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
6945ffb3f7
commit
45d24e9f43
@ -1 +1 @@
|
||||
9371
|
||||
9372
|
||||
@ -1 +1 @@
|
||||
647b7158953b7db7ebab61f54796669561470351
|
||||
a6d74986bd7b96aa41624ed407a46f7f63eadd55
|
||||
@ -89,6 +89,16 @@ sub handle {
|
||||
# Execute the handler
|
||||
my $result = $self->_handle;
|
||||
|
||||
# The result needs to be a valid JSON data structure
|
||||
# and not a undefined or scalar value.
|
||||
if (!ref $result
|
||||
|| blessed($result)
|
||||
|| ref $result ne 'HASH'
|
||||
|| ref $result ne 'ARRAY')
|
||||
{
|
||||
$result = { result => $result };
|
||||
}
|
||||
|
||||
$self->response($result);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user