summaryrefslogtreecommitdiff
path: root/methods/http.h
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-09-14 13:22:19 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2011-09-14 13:22:19 +0200
commita0e07f3ec885c12c733c12805391646c202f3f31 (patch)
treefaa658f29d7dff42c6ed475037dd462384eab46e /methods/http.h
parentb11fe392b2245354591296df88c3be2e6218af12 (diff)
parentafd7b358f94efddb83a2911ec1a21e7280074b1e (diff)
merged from lp:~donkult/apt/experimental
Diffstat (limited to 'methods/http.h')
-rw-r--r--methods/http.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/methods/http.h b/methods/http.h
index 6302807c5..c47d7184a 100644
--- a/methods/http.h
+++ b/methods/http.h
@@ -23,29 +23,29 @@ class HttpMethod;
class CircleBuf
{
unsigned char *Buf;
- unsigned long Size;
- unsigned long InP;
- unsigned long OutP;
+ unsigned long long Size;
+ unsigned long long InP;
+ unsigned long long OutP;
string OutQueue;
- unsigned long StrPos;
- unsigned long MaxGet;
+ unsigned long long StrPos;
+ unsigned long long MaxGet;
struct timeval Start;
- static unsigned long BwReadLimit;
- static unsigned long BwTickReadData;
+ static unsigned long long BwReadLimit;
+ static unsigned long long BwTickReadData;
static struct timeval BwReadTick;
static const unsigned int BW_HZ;
- unsigned long LeftRead() const
+ unsigned long long LeftRead() const
{
- unsigned long Sz = Size - (InP - OutP);
+ unsigned long long Sz = Size - (InP - OutP);
if (Sz > Size - (InP%Size))
Sz = Size - (InP%Size);
return Sz;
}
- unsigned long LeftWrite() const
+ unsigned long long LeftWrite() const
{
- unsigned long Sz = InP - OutP;
+ unsigned long long Sz = InP - OutP;
if (InP > MaxGet)
Sz = MaxGet - OutP;
if (Sz > Size - (OutP%Size))
@@ -67,7 +67,7 @@ class CircleBuf
bool WriteTillEl(string &Data,bool Single = false);
// Control the write limit
- void Limit(long Max) {if (Max == -1) MaxGet = 0-1; else MaxGet = OutP + Max;}
+ void Limit(long long Max) {if (Max == -1) MaxGet = 0-1; else MaxGet = OutP + Max;}
bool IsLimit() const {return MaxGet == OutP;};
void Print() const {cout << MaxGet << ',' << OutP << endl;};
@@ -79,7 +79,7 @@ class CircleBuf
void Reset();
void Stats();
- CircleBuf(unsigned long Size);
+ CircleBuf(unsigned long long Size);
~CircleBuf() {delete [] Buf; delete Hash;};
};
@@ -92,8 +92,8 @@ struct ServerState
char Code[MAXLEN];
// These are some statistics from the last parsed header lines
- unsigned long Size;
- signed long StartPos;
+ unsigned long long Size;
+ signed long long StartPos;
time_t Date;
bool HaveContent;
enum {Chunked,Stream,Closes} Encoding;