summaryrefslogtreecommitdiff
path: root/src/HttpResponse.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-11-03 16:19:21 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-11-03 16:19:21 +0900
commit6ef91d60b34a2a93b397b6db4daabfe8017d31fb (patch)
tree9bea3d0ad7b599280b18e5e5d42ecd6201c2f0e8 /src/HttpResponse.cc
parente8d4deecad3c0b2defb3059ed11eaae24feb2e81 (diff)
Rewritten util::stripIter(), which now returns pair of iterator.
Diffstat (limited to 'src/HttpResponse.cc')
-rw-r--r--src/HttpResponse.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/HttpResponse.cc b/src/HttpResponse.cc
index 0c879291..d346a755 100644
--- a/src/HttpResponse.cc
+++ b/src/HttpResponse.cc
@@ -309,11 +309,12 @@ bool parseMetalinkHttpLink(MetalinkHttpEntry& result, const std::string& s)
if(last == s.end()) {
return false;
}
- std::string uri = util::stripIter(first+1, last);
- if(uri.empty()) {
+ std::pair<std::string::const_iterator,
+ std::string::const_iterator> p = util::stripIter(first+1, last);
+ if(p.first == p.second) {
return false;
} else {
- result.uri = uri;
+ result.uri.assign(p.first, p.second);
}
last = std::find(last, s.end(), ';');
if(last != s.end()) {