diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-11-15 12:52:03 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-11-15 12:52:03 +0000 |
| commit | d8d159ccd86183649771b5b20ef154504540b1ab (patch) | |
| tree | c32e4a8b838fced1337b406a81d56cd1f80d3712 /src/HttpHeader.h | |
| parent | 6a1fe669751801b55affa0aeaff4646ac2ac6a00 (diff) | |
2010-11-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Replaced HttpHeader::responseStatus_ with HttpHeader::statusCode_.
statusCode_ is of type int.
* src/AbstractProxyResponseCommand.cc
* src/FtpNegotiationCommand.cc
* src/HttpHeader.cc
* src/HttpHeader.h
* src/HttpHeaderProcessor.cc
* src/HttpResponse.cc
* src/HttpResponse.h
* src/HttpResponseCommand.cc
* src/HttpSkipResponseCommand.cc
* src/util.cc
* src/util.h
* test/HttpHeaderProcessorTest.cc
* test/HttpHeaderTest.cc
* test/HttpResponseTest.cc
* test/UtilTest.cc
Diffstat (limited to 'src/HttpHeader.h')
| -rw-r--r-- | src/HttpHeader.h | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/src/HttpHeader.h b/src/HttpHeader.h index ca7c99d3..6eb6ad1d 100644 --- a/src/HttpHeader.h +++ b/src/HttpHeader.h @@ -52,9 +52,8 @@ class HttpHeader { private: std::multimap<std::string, std::string> table_; - // for HTTP response header only - // response status, e.g. "200" - std::string responseStatus_; + // HTTP status code, e.g. 200 + int statusCode_; // HTTP version, e.g. HTTP/1.1 std::string version_; @@ -77,12 +76,15 @@ public: SharedHandle<Range> getRange() const; - const std::string& getResponseStatus() const + int getStatusCode() const { - return responseStatus_; + return statusCode_; } - void setResponseStatus(const std::string& responseStatus); + void setStatusCode(int code) + { + statusCode_ = code; + } const std::string& getVersion() const { @@ -143,28 +145,6 @@ public: static const std::string ACCEPT_ENCODING; static const std::string HTTP_1_1; - - static const std::string S200; - - static const std::string S206; - - static const std::string S300; - - static const std::string S301; - - static const std::string S302; - - static const std::string S303; - - static const std::string S304; - - static const std::string S307; - - static const std::string S400; - - static const std::string S401; - - static const std::string S404; }; typedef SharedHandle<HttpHeader> HttpHeaderHandle; |
