diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-07-27 21:15:54 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-07-27 21:15:54 +0900 |
| commit | ce101f5ad29bfb37d93f28a117e1963968a061c4 (patch) | |
| tree | 8eb44b705b489c54037aaae6809fae685b6aeeee /src/HttpResponse.cc | |
| parent | c536e460aa893b20d0ff4d85b2e99b7f9e563d81 (diff) | |
Use HttpHeader::getIterator() instead of HttpHeader::get()
Diffstat (limited to 'src/HttpResponse.cc')
| -rw-r--r-- | src/HttpResponse.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/HttpResponse.cc b/src/HttpResponse.cc index da637798..0e10c16a 100644 --- a/src/HttpResponse.cc +++ b/src/HttpResponse.cc @@ -137,11 +137,13 @@ std::string HttpResponse::determinFilename() const void HttpResponse::retrieveCookie() { Time now; - std::vector<std::string> v = httpHeader_->get(HttpHeader::SET_COOKIE); - for(std::vector<std::string>::const_iterator itr = v.begin(), eoi = v.end(); - itr != eoi; ++itr) { + std::pair<std::multimap<std::string, std::string>::const_iterator, + std::multimap<std::string, std::string>::const_iterator> r = + httpHeader_->getIterator(HttpHeader::SET_COOKIE); + for(; r.first != r.second; ++r.first) { httpRequest_->getCookieStorage()->parseAndStore - (*itr, httpRequest_->getHost(), httpRequest_->getDir(), now.getTime()); + ((*r.first).second, httpRequest_->getHost(), httpRequest_->getDir(), + now.getTime()); } } |
