MT#14477 Response about faxserver feature unavailability from API

Change-Id: I98dceb0fe75e54ffc39dc9cd9ef9507feff8af33
(cherry picked from commit 8261f0ec0e)
changes/26/3326/1
Irina Peshinskaya 10 years ago
parent 5597f6999e
commit 344a47497d

@ -147,6 +147,11 @@ sub OPTIONS :Allow {
sub POST :Allow { sub POST :Allow {
my ($self, $c) = @_; my ($self, $c) = @_;
{ {
if(!$c->config->{features}->{faxserver}){
$c->log->error("faxserver feature is not active.");
$self->error($c, HTTP_UNPROCESSABLE_ENTITY, "Faxserver feature is not active.");
return;
}
last unless $self->forbid_link_header($c); last unless $self->forbid_link_header($c);
last unless $self->valid_media_type($c, 'multipart/form-data'); last unless $self->valid_media_type($c, 'multipart/form-data');
my $json_utf8 = encode_utf8($c->req->param('json')); my $json_utf8 = encode_utf8($c->req->param('json'));

Loading…
Cancel
Save