diff options
author | Dylan William Hardison <dylan@mozilla.com> | 2016-01-20 08:07:18 +0100 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2016-01-20 08:07:18 +0100 |
commit | 15a6c7ebdf31cfdaf50db52ca49861065d079f50 (patch) | |
tree | 86f9e986fac1e68516d12b46bcf2c789b8920699 | |
parent | ace6728970b520f219907887cd7a90010239c2a1 (diff) | |
download | bugzilla-15a6c7ebdf31cfdaf50db52ca49861065d079f50.tar.gz bugzilla-15a6c7ebdf31cfdaf50db52ca49861065d079f50.tar.xz |
Bug 1231918 - error handler doesn't close multi-part responses
-rw-r--r-- | Bugzilla/Sentry.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Bugzilla/Sentry.pm b/Bugzilla/Sentry.pm index e9dedc8dd..d49eb0808 100644 --- a/Bugzilla/Sentry.pm +++ b/Bugzilla/Sentry.pm @@ -332,7 +332,12 @@ sub _sentry_die_handler { # if we are called via CGI::Carp::die chances are something is seriously # wrong, so skip trying to use ThrowTemplateError if (!$in_cgi_carp_die && !$is_compilation_failure) { - eval { Bugzilla::Error::ThrowTemplateError($message) }; + eval { + my $cgi = Bugzilla->cgi; + $cgi->close_standby_message('text/html', 'inline', 'error', 'html'); + Bugzilla::Error::ThrowTemplateError($message); + print $cgi->multipart_final() if $cgi->{_multipart_in_progress}; + }; $nested_error = $@ if $@; } |