diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-04-21 10:48:11 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-04-21 10:48:11 +0000 |
| commit | e1fa62e6c7ce3617b8bb72b4ffe63f505cc0fdda (patch) | |
| tree | 4e68de6b8c0fe23eb681dd5937b0e4409d6dbccf /src/HttpHeader.h | |
| parent | 3eb74629cbd0f01113bc581d486a8ec95633b4ad (diff) | |
2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Now HTTP status and version are a member variable of HttpHeader.
HTTP status is processed as a string, not integer.
* src/AbstractProxyResponseCommand.cc
* src/HttpConnection.cc
* src/HttpHeader.cc
* src/HttpHeader.h
* src/HttpHeaderProcessor.cc
* src/HttpHeaderProcessor.h
* src/HttpResponse.cc
* src/HttpResponse.h
* test/HttpHeaderProcessorTest.cc
* test/HttpResponseTest.cc
Diffstat (limited to 'src/HttpHeader.h')
| -rw-r--r-- | src/HttpHeader.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/HttpHeader.h b/src/HttpHeader.h index 6349a9b7..87c7c82c 100644 --- a/src/HttpHeader.h +++ b/src/HttpHeader.h @@ -40,6 +40,7 @@ #include <map> #include <deque> #include <string> +#include <iosfwd> namespace aria2 { @@ -48,6 +49,13 @@ class Range; class HttpHeader { private: std::multimap<std::string, std::string> table; + + // for HTTP response header only + // response status, e.g. "200" + std::string _responseStatus; + + // HTTP version, e.g. HTTP/1.1 + std::string _version; public: HttpHeader() {} ~HttpHeader() {} @@ -60,6 +68,16 @@ public: uint64_t getFirstAsULLInt(const std::string& name) const; SharedHandle<Range> getRange() const; + + const std::string& getResponseStatus() const; + + void setResponseStatus(const std::string& responseStatus); + + const std::string& getVersion() const; + + void setVersion(const std::string& version); + + void fill(std::istream& in); }; typedef SharedHandle<HttpHeader> HttpHeaderHandle; |
