From 0f67eeda028f31b15bc87b1cafd0cc56f9ccb12b Mon Sep 17 00:00:00 2001 From: Christian Hofstaedtler Date: Mon, 10 Mar 2014 11:59:39 +0100 Subject: [PATCH] Webserver: try harder to always return *some* response Even a 500 is better than a connection reset. --- pdns/webserver.cc | 16 +++++++++++++++- pdns/webserver.hh | 5 +++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/pdns/webserver.cc b/pdns/webserver.cc index 0c18cd2ccb..44c668733e 100644 --- a/pdns/webserver.cc +++ b/pdns/webserver.cc @@ -229,7 +229,21 @@ HttpResponse WebServer::handleRequest(HttpRequest req) throw HttpNotFoundException(); } - (*handler)(&req, &resp); + try { + (*handler)(&req, &resp); + } + catch(PDNSException &e) { + L<