summaryrefslogtreecommitdiff
path: root/methods/http.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-09-13 17:52:22 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-09-13 17:52:22 +0200
commit74b220028595342028e3309002e4ec359af328f9 (patch)
tree0132b7fd4b4f5fa5e2dbce1f2e0fbeeff2c8e101 /methods/http.h
parent650faab01603caac04494d54cf6b10a65c00ea13 (diff)
parentb11fe392b2245354591296df88c3be2e6218af12 (diff)
merge with debian/experimental
Diffstat (limited to 'methods/http.h')
-rw-r--r--methods/http.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/methods/http.h b/methods/http.h
index b74740ab3..c47d7184a 100644
--- a/methods/http.h
+++ b/methods/http.h
@@ -36,14 +36,14 @@ class CircleBuf
static struct timeval BwReadTick;
static const unsigned int BW_HZ;
- unsigned long long LeftRead()
+ unsigned long long LeftRead() const
{
unsigned long long Sz = Size - (InP - OutP);
if (Sz > Size - (InP%Size))
Sz = Size - (InP%Size);
return Sz;
}
- unsigned long long LeftWrite()
+ unsigned long long LeftWrite() const
{
unsigned long long Sz = InP - OutP;
if (InP > MaxGet)
@@ -68,12 +68,12 @@ class CircleBuf
// Control the write limit
void Limit(long long Max) {if (Max == -1) MaxGet = 0-1; else MaxGet = OutP + Max;}
- bool IsLimit() {return MaxGet == OutP;};
- void Print() {cout << MaxGet << ',' << OutP << endl;};
+ bool IsLimit() const {return MaxGet == OutP;};
+ void Print() const {cout << MaxGet << ',' << OutP << endl;};
// Test for free space in the buffer
- bool ReadSpace() {return Size - (InP - OutP) > 0;};
- bool WriteSpace() {return InP - OutP > 0;};
+ bool ReadSpace() const {return Size - (InP - OutP) > 0;};
+ bool WriteSpace() const {return InP - OutP > 0;};
// Dump everything
void Reset();
@@ -113,7 +113,7 @@ struct ServerState
URI ServerName;
bool HeaderLine(string Line);
- bool Comp(URI Other) {return Other.Host == ServerName.Host && Other.Port == ServerName.Port;};
+ bool Comp(URI Other) const {return Other.Host == ServerName.Host && Other.Port == ServerName.Port;};
void Reset() {Major = 0; Minor = 0; Result = 0; Size = 0; StartPos = 0;
Encoding = Closes; time(&Date); ServerFd = -1;
Pipeline = true;};