View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0034828 | mantisbt | other | public | 2024-10-07 10:47 | 2025-03-01 18:40 |
Reporter | c_schmitz | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 2.26.4 | ||||
Target Version | 2.27.1 | Fixed in Version | 2.27.1 | ||
Summary | 0034828: HTTP response code not set on errors when using FastCGI | ||||
Description | The error code is not set when the web server runs on FastCGI, as reported by @c_schmitz in 0034634:0069314
| ||||
Tags | No tags attached. | ||||
The fastcgi_finish_request() call was introduced in commit MantisBT master cea405cc, which claims Performance optimisation for users not using email send via cron jobs and using php-fpm The change is unfortunately not linked to a bugtracker issue, but my guess is that this call is no longer needed - or at least not in this function. Back when it was introduced, html_end() was calling email_send_all(), but nowadays this is managed via a shutdown function (see 0017460). |
|
@c_schmitz, could you please test proposed fix in PR https://github.com/mantisbt/mantisbt/pull/2035 ? Thanks |
|
Thank you - works! |
|
MantisBT: master-2.27 5ff8bb6a 2024-10-07 12:37 Details Diff |
Move fastcgi_finish_request() to email shutdown function This was originally added to html_end() to improve performance when using php-fpm and sending mail synchronously [1], back when the function was calling email_send_all(), i.e. before issue 0017460 moved that to email_shutdown_function(). This is now causing issues as the HTTP response code is not set when an error occurs and FastCGI is used. Fixes 0034828, 0034634 [1]: see commit cea405ccf228fd2c6ac694574a74e87396b14f1f |
Affected Issues 0017460, 0034634, 0034828 |
|
mod - core/email_api.php | Diff File | ||
mod - core/html_api.php | Diff File |