|
@@ -92,10 +92,10 @@ sub _process_response {
|
|
|
my $decoded_json = undef;
|
|
my $decoded_json = undef;
|
|
|
print "RES: ".$response->decoded_content."\n\n" if $self->{debug};
|
|
print "RES: ".$response->decoded_content."\n\n" if $self->{debug};
|
|
|
if (($response->message ne 'No Content') && ($response->content ne '')) {
|
|
if (($response->message ne 'No Content') && ($response->content ne '')) {
|
|
|
- if ($response->content =~ m/^<html>/i) {
|
|
|
|
|
- $data->{'cmd_return'} = 'Server returned error message '.$response->content.' instead of data';
|
|
|
|
|
- return $data;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if ($response->content =~ m/^<html>/i) {
|
|
|
|
|
+ $data->{'cmd_return'} = 'Server returned error message '.$response->content.' instead of data';
|
|
|
|
|
+ return $data;
|
|
|
|
|
+ }
|
|
|
$decoded_json = $json->allow_nonref(1)->utf8(1)->decode($response->content);
|
|
$decoded_json = $json->allow_nonref(1)->utf8(1)->decode($response->content);
|
|
|
$data->{'sessionId'} = $decoded_json->{'sessionId'};
|
|
$data->{'sessionId'} = $decoded_json->{'sessionId'};
|
|
|
}
|
|
}
|