mirror of https://github.com/aria2/aria2
Use HttpHeader::getIterator() instead of HttpHeader::get()
parent
c536e460aa
commit
ce101f5ad2
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue