diff options
author | David Lawrence <dkl@mozilla.com> | 2016-01-20 22:53:45 +0100 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2016-01-20 22:53:45 +0100 |
commit | 871de5e2dbb48867b08371ce90881d8f85b18ff1 (patch) | |
tree | 2b64ab069624a7c9a24ad6b92e71c360a4905d88 /Bugzilla/WebService/Server | |
parent | 864d9b8f7988fa8e1f069c96956573fc67ebccfa (diff) | |
download | bugzilla-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/Server')
-rw-r--r-- | Bugzilla/WebService/Server/JSONRPC.pm | 6 |
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; } |