Use HttpHeader::getIterator() instead of HttpHeader::get()

pull/1/head
Tatsuhiro Tsujikawa 2011-07-27 21:15:54 +09:00
parent c536e460aa
commit ce101f5ad2
1 changed files with 6 additions and 4 deletions

View File

@ -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());
}
}