summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-06-25 12:32:11 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-06-27 11:43:09 +0200
commitcc0a4c82b3c132abba9b9ec35fd61bc8b45a1b80 (patch)
treea5eae170b4404e7e0eb4d06fa8bdf7e6d9587ec5 /methods
parenta9e4fd6534a2ae6a5a983df77e5b1efa32f3a756 (diff)
downloadapt-cc0a4c82b3c132abba9b9ec35fd61bc8b45a1b80.tar.gz
close server if parsing of header field failed
Seen in #828011 if we fail to parse a header field like Last-Modified we end up interpreting the data as response header for coming requests in case we don't rotate to a new server in DNS rotation.
Diffstat (limited to 'methods')
-rw-r--r--methods/server.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/methods/server.cc b/methods/server.cc
index 9db45eb8c..5ab97a660 100644
--- a/methods/server.cc
+++ b/methods/server.cc
@@ -556,6 +556,7 @@ int ServerMethod::Loop()
{
_error->Error(_("Bad header data"));
Fail(true);
+ Server->Close();
RotateDNS();
continue;
}