summaryrefslogtreecommitdiff
path: root/methods/server.h
diff options
context:
space:
mode:
Diffstat (limited to 'methods/server.h')
-rw-r--r--methods/server.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/methods/server.h b/methods/server.h
index f5e68d902..1b81e3549 100644
--- a/methods/server.h
+++ b/methods/server.h
@@ -34,7 +34,8 @@ struct ServerState
char Code[360];
// These are some statistics from the last parsed header lines
- unsigned long long Size;
+ unsigned long long Size; // size of the usable content (aka: the file)
+ unsigned long long JunkSize; // size of junk content (aka: server error pages)
unsigned long long StartPos;
time_t Date;
bool HaveContent;
@@ -71,7 +72,7 @@ struct ServerState
RunHeadersResult RunHeaders(FileFd * const File, const std::string &Uri);
bool Comp(URI Other) const {return Other.Host == ServerName.Host && Other.Port == ServerName.Port;};
- virtual void Reset() {Major = 0; Minor = 0; Result = 0; Code[0] = '\0'; Size = 0;
+ virtual void Reset() {Major = 0; Minor = 0; Result = 0; Code[0] = '\0'; Size = 0; JunkSize = 0;
StartPos = 0; Encoding = Closes; time(&Date); HaveContent = false;
State = Header; Persistent = false; Pipeline = true;};
virtual bool WriteResponse(std::string const &Data) = 0;