diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-05-13 16:58:40 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-05-13 16:58:40 +0000 |
| commit | 29d5651cd54bdc61bf5412451ca6510c54be2c84 (patch) | |
| tree | c9f3049d9e7041f1a08305d79ff00754716b2cc7 /src/HttpRequest.cc | |
| parent | 0c821d0ad7458f58668cc46635e52007f4e13b35 (diff) | |
2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Made USER_AGENT const. Made "/" static const std::string.
* src/A2STR.cc
* src/A2STR.h
* src/HttpRequest.cc
* src/HttpRequest.h
Diffstat (limited to 'src/HttpRequest.cc')
| -rw-r--r-- | src/HttpRequest.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc index 5b92b9b5..9815d873 100644 --- a/src/HttpRequest.cc +++ b/src/HttpRequest.cc @@ -49,7 +49,7 @@ namespace aria2 { -std::string HttpRequest::USER_AGENT = "aria2"; +const std::string HttpRequest::USER_AGENT("aria2"); HttpRequest::HttpRequest():entityLength(0), authEnabled(false), @@ -137,10 +137,10 @@ std::string HttpRequest::createRequest() const if(getProtocol() == Request::PROTO_FTP || proxyEnabled) { requestLine += getCurrentURI(); } else { - if(getDir() == "/") { + if(getDir() == A2STR::SLASH_C) { requestLine += getDir(); } else { - requestLine += getDir()+"/"; + requestLine += getDir()+A2STR::SLASH_C; } requestLine += getFile()+getQuery(); } |
