]> git.saurik.com Git - apt.git/commitdiff
close server if parsing of header field failed
authorDavid Kalnischkies <david@kalnischkies.de>
Sat, 25 Jun 2016 10:32:11 +0000 (12:32 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Mon, 27 Jun 2016 09:43:09 +0000 (11:43 +0200)
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.

methods/server.cc

index 9db45eb8cbe038288f1909a7fb4cecb28cae8f86..5ab97a66037c1dcc8f56a6d6d1a45b4a03eadb85 100644 (file)
@@ -556,6 +556,7 @@ int ServerMethod::Loop()
         {
            _error->Error(_("Bad header data"));
            Fail(true);
         {
            _error->Error(_("Bad header data"));
            Fail(true);
+           Server->Close();
            RotateDNS();
            continue;
         }
            RotateDNS();
            continue;
         }