From: Remi Gacogne Date: Fri, 13 May 2016 16:09:38 +0000 (+0200) Subject: dnsdist: Only log YaHTTP's parser exceptions in verbose mode X-Git-Tag: auth-4.0.0-beta1~23^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59e9504ee48c948d082fcce572e2a36e9d945ff2;p=thirdparty%2Fpdns.git dnsdist: Only log YaHTTP's parser exceptions in verbose mode Log the remote client address in any case. --- diff --git a/pdns/dnsdist-web.cc b/pdns/dnsdist-web.cc index 0699f14b07..f0cb43be82 100644 --- a/pdns/dnsdist-web.cc +++ b/pdns/dnsdist-web.cc @@ -400,13 +400,18 @@ static void connectionThread(int sock, ComboAddress remote, string password, str fclose(fp); fp=0; } + catch(const YaHTTP::ParseError& e) { + vinfolog("Webserver thread died with parse error exception while processing a request from %s: %s", remote.toStringWithPort(), e.what()); + if(fp) + fclose(fp); + } catch(const std::exception& e) { - errlog("Webserver thread died with exception: %s", e.what()); + errlog("Webserver thread died with exception while processing a request from %s: %s", remote.toStringWithPort(), e.what()); if(fp) fclose(fp); } catch(...) { - errlog("Webserver thread died with exception"); + errlog("Webserver thread died with exception while processing a request from %s", remote.toStringWithPort()); if(fp) fclose(fp); }