Merge tag 'v0.21.23'
release v0.21.23
This commit is contained in:
@@ -394,7 +394,7 @@ private:
|
||||
break;
|
||||
|
||||
case State::HREF:
|
||||
response.href.assign(s, len);
|
||||
response.href.append(s, len);
|
||||
break;
|
||||
|
||||
case State::STATUS:
|
||||
@@ -474,7 +474,7 @@ class HttpListDirectoryOperation final : public PropfindOperation {
|
||||
public:
|
||||
HttpListDirectoryOperation(CurlGlobal &curl, const char *uri)
|
||||
:PropfindOperation(curl, uri, 1),
|
||||
base_path(UriPathOrSlash(uri)) {}
|
||||
base_path(CurlUnescape(GetEasy(), UriPathOrSlash(uri))) {}
|
||||
|
||||
std::unique_ptr<StorageDirectoryReader> Perform() {
|
||||
DeferStart();
|
||||
@@ -499,8 +499,7 @@ private:
|
||||
|
||||
/* kludge: ignoring case in this comparison to avoid
|
||||
false negatives if the web server uses a different
|
||||
case in hex digits in escaped characters; TODO:
|
||||
implement properly */
|
||||
case */
|
||||
path = StringAfterPrefixIgnoreCase(path, base_path.c_str());
|
||||
if (path == nullptr || path.empty())
|
||||
return nullptr;
|
||||
@@ -523,11 +522,12 @@ protected:
|
||||
if (r.status != 200)
|
||||
return;
|
||||
|
||||
const auto escaped_name = HrefToEscapedName(r.href.c_str());
|
||||
if (escaped_name.IsNull())
|
||||
std::string href = CurlUnescape(GetEasy(), r.href.c_str());
|
||||
const auto name = HrefToEscapedName(href.c_str());
|
||||
if (name.IsNull())
|
||||
return;
|
||||
|
||||
entries.emplace_front(CurlUnescape(GetEasy(), escaped_name));
|
||||
entries.emplace_front(std::string(name.data, name.size));
|
||||
|
||||
auto &info = entries.front().info;
|
||||
info = StorageFileInfo(r.collection
|
||||
|
Reference in New Issue
Block a user