summaryrefslogtreecommitdiff
path: root/methods/basehttp.h
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2021-10-18 13:42:56 +0000
committerJulian Andres Klode <jak@debian.org>2021-10-18 13:42:56 +0000
commitad7bae309a827592aa228af9470c1aa7abdd189e (patch)
treeb62356022ed89241636500fafa7105429c095651 /methods/basehttp.h
parentefa3528de4277a3d5195c5ce875e7ee960726239 (diff)
parentfe4201380bd377aebd25bd96a06a7eda6c74a533 (diff)
Merge branch 'pu/content-length-0' into 'main'
basehttp: Turn HaveContent into a TriState See merge request apt-team/apt!179
Diffstat (limited to 'methods/basehttp.h')
-rw-r--r--methods/basehttp.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/methods/basehttp.h b/methods/basehttp.h
index c0d14d854..2a13c7abf 100644
--- a/methods/basehttp.h
+++ b/methods/basehttp.h
@@ -27,6 +27,12 @@ class Hashes;
class BaseHttpMethod;
struct ServerState;
+enum class HaveContent
+{
+ UNKNOWN,
+ FALSE,
+ TRUE,
+};
struct RequestState
{
unsigned int Major = 0;
@@ -46,7 +52,8 @@ struct RequestState
unsigned long long MaximumSize = 0;
time_t Date;
- bool HaveContent = false;
+ HaveContent haveContent = HaveContent::UNKNOWN;
+
enum {Chunked,Stream,Closes} Encoding = Closes;
enum {Header, Data} State = Header;
std::string Location;