| 58 | } |
| 59 | |
| 60 | void EngineRequest::finalizeError() |
| 61 | { |
| 62 | Response *res = context->response(); |
| 63 | |
| 64 | res->setContentType("text/html; charset=utf-8"_ba); |
| 65 | |
| 66 | QByteArray erroBody; |
| 67 | |
| 68 | // Trick IE. Old versions of IE would display their own error page instead |
| 69 | // of ours if we'd give it less than 512 bytes. |
| 70 | erroBody.reserve(512); |
| 71 | |
| 72 | erroBody.append(context->errors().join(u'\n').toUtf8()); |
| 73 | |
| 74 | res->setBody(erroBody); |
| 75 | |
| 76 | // Return 500 |
| 77 | res->setStatus(Response::InternalServerError); |
| 78 | } |
| 79 | |
| 80 | void EngineRequest::finalize() |
| 81 | { |
nothing calls this directly
no test coverage detected