summaryrefslogtreecommitdiff
path: root/src/HttpRequest.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-28 00:25:06 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-29 23:09:09 +0900
commit5a223115e09cd568169fe2efd71d09689a980335 (patch)
tree61250fc5f89229e4ecc63d70ae2069207388fea0 /src/HttpRequest.cc
parent0b1e05b13bfd7cfbf75b299c1f32cdd6e6aed953 (diff)
Rewrite CookieStorage
Diffstat (limited to 'src/HttpRequest.cc')
-rw-r--r--src/HttpRequest.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc
index 3e7d1a4b..33469813 100644
--- a/src/HttpRequest.cc
+++ b/src/HttpRequest.cc
@@ -234,13 +234,11 @@ std::string HttpRequest::createRequest()
std::string cookiesValue;
std::string path = getDir();
path += getFile();
- std::vector<Cookie> cookies =
- cookieStorage_->criteriaFind(getHost(), path,
- Time().getTime(),
- getProtocol() == "https");
- for(std::vector<Cookie>::const_iterator itr = cookies.begin(),
- eoi = cookies.end(); itr != eoi; ++itr) {
- cookiesValue += (*itr).toString();
+ auto cookies = cookieStorage_->criteriaFind(getHost(), path,
+ Time().getTime(),
+ getProtocol() == "https");
+ for(auto c : cookies) {
+ cookiesValue += c->toString();
cookiesValue += ";";
}
if(!cookiesValue.empty()) {