From ebdb6f1810a20ac240b5b2192dc2e6532ff149d2 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 11 Aug 2016 16:59:13 +0200 Subject: reorganize server-states resetting in http/https MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We keep various information bits about the server around, some only effecting the currently handled file (like sizes) while others should be persistent (like pipeline detections). http used to reset all file-related manually, which is a bit silly if we already have a Reset() method – which does reset all through –, so extending it with a parameter for reuse and calling it from https too (as this was previously resetting by just creating a new state struct – it uses no value of the persistent state-keeping yet as it supports no pipelining). Gbp-Dch: Ignore --- methods/http.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'methods/http.cc') diff --git a/methods/http.cc b/methods/http.cc index 0358b50cd..8d34aa6e3 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -647,6 +647,13 @@ bool HttpServerState::InitHashes(HashStringList const &ExpectedHashes) /*{{{*/ return true; } /*}}}*/ +void HttpServerState::Reset(bool const Everything) /*{{{*/ +{ + ServerState::Reset(Everything); + if (Everything) + ServerFd = -1; +} + /*}}}*/ APT_PURE Hashes * HttpServerState::GetHashes() /*{{{*/ { -- cgit v1.2.3