summaryrefslogtreecommitdiff
path: root/src/HttpHeader.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-03-05 12:31:57 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-03-05 12:31:57 +0000
commitba7f9f765794bc197750253f07211c66afdd69e5 (patch)
tree5b6dacc204d1ef6f3c2d19416d68524e180f98da /src/HttpHeader.h
parentcc24f7cdf816a4e127efeaf9b74146e1296467c9 (diff)
2007-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/HttpHeader.h (Range.h): New include. (status): New variable. (HttpHeader): Initialized status with 0. (getStatus): New function. (setStatus): New function. (getRange): New function. (HttpHeaderHandle): New function. * src/HttpHeader.cc (getRange): New function. * src/Request.h (RequestWeakHandle): New definition. * src/HttpConnection.h (HttpConnectionHandle): New type definition. * src/HttpConnection.cc (receiveResponse): Set HTTP status to headers. * src/main.cc (showUsage): Fixed typo. * src/Segment.h (SegmentHandle): New type definition. * src/BitfieldMan.h (getMissingUnusedLength): New function. * src/BitfieldMan.cc (getMissingUnusedLength): New function.
Diffstat (limited to 'src/HttpHeader.h')
-rw-r--r--src/HttpHeader.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/HttpHeader.h b/src/HttpHeader.h
index 568bc1b4..363f207d 100644
--- a/src/HttpHeader.h
+++ b/src/HttpHeader.h
@@ -36,17 +36,17 @@
#define _D_HTTP_HEADER_H_
#include "common.h"
+#include "Range.h"
#include <map>
#include <deque>
#include <string>
-using namespace std;
-
class HttpHeader {
private:
+ int32_t status;
multimap<string, string> table;
public:
- HttpHeader() {}
+ HttpHeader():status(0) {}
~HttpHeader() {}
void put(const string& name, const string& value);
@@ -55,6 +55,20 @@ public:
Strings get(const string& name) const;
int getFirstAsInt(const string& name) const;
long long int getFirstAsLLInt(const string& name) const;
+
+ RangeHandle getRange() const;
+
+ int32_t getStatus() const
+ {
+ return status;
+ }
+
+ void setStatus(int32_t status)
+ {
+ this->status = status;
+ }
};
+typedef SharedHandle<HttpHeader> HttpHeaderHandle;
+
#endif // _D_HTTP_HEADER_H_