diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-11-03 16:19:21 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-11-03 16:19:21 +0900 |
| commit | 6ef91d60b34a2a93b397b6db4daabfe8017d31fb (patch) | |
| tree | 9bea3d0ad7b599280b18e5e5d42ecd6201c2f0e8 /src/HttpResponse.cc | |
| parent | e8d4deecad3c0b2defb3059ed11eaae24feb2e81 (diff) | |
Rewritten util::stripIter(), which now returns pair of iterator.
Diffstat (limited to 'src/HttpResponse.cc')
| -rw-r--r-- | src/HttpResponse.cc | 7 |
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()) { |
