fix automated tests with network requests

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
Matthieu Gallien 2023-09-17 10:45:33 +02:00 committed by Matthieu Gallien
parent e3456847d8
commit ced85ac287

View file

@ -1076,7 +1076,7 @@ QNetworkReply *FakeQNAM::createRequest(QNetworkAccessManager::Operation op, cons
const bool isUpload = newRequest.url().path().startsWith(sUploadUrl.path()); const bool isUpload = newRequest.url().path().startsWith(sUploadUrl.path());
FileInfo &info = isUpload ? _uploadFileInfo : _remoteRootFileInfo; FileInfo &info = isUpload ? _uploadFileInfo : _remoteRootFileInfo;
auto verb = newRequest.attribute(QNetworkRequest::CustomVerbAttribute); auto verb = newRequest.attribute(QNetworkRequest::CustomVerbAttribute).toString();
if (verb == QLatin1String("PROPFIND")) { if (verb == QLatin1String("PROPFIND")) {
// Ignore outgoingData always returning something good enough, works for now. // Ignore outgoingData always returning something good enough, works for now.
reply = new FakePropfindReply { info, op, newRequest, this }; reply = new FakePropfindReply { info, op, newRequest, this };