]> git.saurik.com Git - apt.git/commit
separating state variables regarding server/request
authorDavid Kalnischkies <david@kalnischkies.de>
Wed, 9 Nov 2016 11:25:44 +0000 (12:25 +0100)
committerDavid Kalnischkies <david@kalnischkies.de>
Sat, 31 Dec 2016 01:29:21 +0000 (02:29 +0100)
commit13a9f08de18dea0dfc1951992b0ddeda9c2fa2dd
tree8ad39c2360ffe9cc7fee09baba04fa6fe3033dbd
parentcfc11b2e1d8480727208b9d3e9577172de9a4038
separating state variables regarding server/request

Having a Reset(bool) method to partially reset certain variables like
the download size always were strange, so this commit splits the
ServerState into an additional RequestState living on the stack for as
long as we deal with this request causing an automatic "reset".

There is much to do still to make this code look better, but this is a
good first step which compiles cleanly and passes all tests, so keeping
it as history might be beneficial and due to avoiding explicit memory
allocations it ends up fixing a small memory leak in https, too.

Closes: #440057
methods/http.cc
methods/http.h
methods/https.cc
methods/https.h
methods/server.cc
methods/server.h