diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-05-13 14:15:23 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-05-13 14:15:23 +0000 |
| commit | 386d19693bc3b06bea14f8fa606f513b6fe1ac9d (patch) | |
| tree | 0137a837f6ce609ac1319b859a5333e0753f7527 /src/HttpRequest.cc | |
| parent | 9d03f0d2f747c7c66a64081a7cabcf4e02c11020 (diff) | |
2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Replaced "" with static const variable A2STR::NIL.
Replaced string comparison against "" with std::string::empty().
Added PROTO_* to Request class and use them as a protocol string
constant.
Made "started", "stopped", "completed" static const variable in
AnnounceList class.
Diffstat (limited to 'src/HttpRequest.cc')
| -rw-r--r-- | src/HttpRequest.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc index e7c939e2..5b92b9b5 100644 --- a/src/HttpRequest.cc +++ b/src/HttpRequest.cc @@ -134,7 +134,7 @@ std::string HttpRequest::getHostText(const std::string& host, uint16_t port) con std::string HttpRequest::createRequest() const { std::string requestLine = "GET "; - if(getProtocol() == "ftp" || proxyEnabled) { + if(getProtocol() == Request::PROTO_FTP || proxyEnabled) { requestLine += getCurrentURI(); } else { if(getDir() == "/") { @@ -193,7 +193,7 @@ std::string HttpRequest::createRequest() const Cookies cookies = request->cookieBox->criteriaFind(getHost(), getDir(), time(0), - getProtocol() == "https" ? + getProtocol() == Request::PROTO_HTTPS ? true : false); for(Cookies::const_iterator itr = cookies.begin(); itr != cookies.end(); itr++) { cookiesValue += (*itr).toString()+";"; |
