From: Christos Tsantilas Date: Thu, 14 Dec 2017 23:44:12 +0000 (+0200) Subject: Squid FTP server dying because of an unhandled exception. (#102) X-Git-Tag: M-staged-PR71~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9118c9517dc62ea9c6a8291c92a818721dba6777;p=thirdparty%2Fsquid.git Squid FTP server dying because of an unhandled exception. (#102) Related message in cache.log: FATAL: Dying from an exception handling failure; exception: reply Unfortunately, Squid does not report the exact place where the exception was thrown, however the most possible reason is a "Must(reply)" failure inside Ftp::Server::writeErrorReply. This is a Measurement Factory project --- diff --git a/src/servers/FtpServer.cc b/src/servers/FtpServer.cc index 47521c9832..e5033c7e46 100644 --- a/src/servers/FtpServer.cc +++ b/src/servers/FtpServer.cc @@ -1126,10 +1126,12 @@ Ftp::Server::writeErrorReply(const HttpReply *reply, const int scode) } #endif - Must(reply); - const char *reason = reply->header.has(Http::HdrType::FTP_REASON) ? - reply->header.getStr(Http::HdrType::FTP_REASON): - reply->sline.reason(); + const char *reason = "Lost Error"; + if (reply) { + reason = reply->header.has(Http::HdrType::FTP_REASON) ? + reply->header.getStr(Http::HdrType::FTP_REASON): + reply->sline.reason(); + } mb.appendf("%i %s\r\n", scode, reason); // error terminating line