summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2016-01-20 22:53:45 +0100
committerDavid Lawrence <dkl@mozilla.com>2016-01-20 22:53:45 +0100
commit871de5e2dbb48867b08371ce90881d8f85b18ff1 (patch)
tree2b64ab069624a7c9a24ad6b92e71c360a4905d88 /Bugzilla/WebService
parent864d9b8f7988fa8e1f069c96956573fc67ebccfa (diff)
downloadbugzilla-871de5e2dbb48867b08371ce90881d8f85b18ff1.tar.gz
bugzilla-871de5e2dbb48867b08371ce90881d8f85b18ff1.tar.xz
Bug 1240029 - The REST API doesn't work correctly with mod_perl
r=dylan
Diffstat (limited to 'Bugzilla/WebService')
-rw-r--r--Bugzilla/WebService/Server/JSONRPC.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/Bugzilla/WebService/Server/JSONRPC.pm b/Bugzilla/WebService/Server/JSONRPC.pm
index 3fa0b65a9..a75bba836 100644
--- a/Bugzilla/WebService/Server/JSONRPC.pm
+++ b/Bugzilla/WebService/Server/JSONRPC.pm
@@ -273,6 +273,9 @@ sub _handle {
my $result = $self->SUPER::_handle(@_);
+ # Reset in_eval to so we get normal exceptions from here
+ Bugzilla->request_cache->{in_eval} = 0;
+
# Set the ETag if not already set in the webservice methods.
my $etag = $self->bz_etag;
if (!$etag && ref $result) {
@@ -425,6 +428,9 @@ sub _argument_type_check {
$params = [$params];
}
+ # Let Bugzilla::Error know we are inside an eval() after this point
+ Bugzilla->request_cache->{in_eval} = 1;
+
return $params;
}