WebDAV: strip quotes from ETag only if present
eGroupware does not include ETags in quotes. SyncEvolution unconditionally stripped the first and last character, making ETags shorter than they really were. Now it strips them only if both are quotation marks.
This commit is contained in:
parent
25889a544c
commit
63768f3df8
|
@ -1191,7 +1191,9 @@ std::string WebDAVSource::ETag2Rev(const std::string &etag)
|
|||
if (boost::starts_with(res, "W/")) {
|
||||
res.erase(0, 2);
|
||||
}
|
||||
if (res.size() >= 2) {
|
||||
if (res.size() >= 2 &&
|
||||
res[0] == '"' &&
|
||||
res[res.size() - 1] == '"') {
|
||||
res = res.substr(1, res.size() - 2);
|
||||
}
|
||||
return res;
|
||||
|
|
Loading…
Reference in a new issue