diff --git a/doc/architecture.rst b/doc/architecture.rst index f4dae60f2..a317b1893 100644 --- a/doc/architecture.rst +++ b/doc/architecture.rst @@ -152,7 +152,7 @@ Conflict files are always created on the client and never on the server. "capabilities":{ "core":{ "pollinterval":60, - "webdav-root":"remote.php/webdav" + "webdav-root":"remote.php/dav" }, "dav":{ "chunking":"1.0" diff --git a/doc/nextcloudcmd.rst b/doc/nextcloudcmd.rst index bde2db0ef..a0630192c 100644 --- a/doc/nextcloudcmd.rst +++ b/doc/nextcloudcmd.rst @@ -92,7 +92,7 @@ Credential Handling :: - $ nextcloudcmd /home/user/my_sync_folder https://carla:secret@server/nextcloud/remote.php/webdav/ + $ nextcloudcmd /home/user/my_sync_folder https://carla:secret@server/nextcloud/remote.php/dav/ To synchronize the Nextcloud directory ``Music`` to the local directory ``media/music``, through a proxy listening on port ``8080``, and on a gateway @@ -100,7 +100,7 @@ machine using IP address ``192.168.178.1``, the command line would be:: $ nextcloudcmd --httpproxy http://192.168.178.1:8080 \ $HOME/media/music \ - https://server/nextcloud/remote.php/webdav/Music + https://server/nextcloud/remote.php/dav/Music ``nextcloudcmd`` will prompt for the user name and password, unless they have been specified on the command line or ``-n`` has been passed. @@ -121,4 +121,4 @@ Example :: $ nextcloudcmd /home/user/ \ - https://:@/remote.php/webdav/ + https://:@/remote.php/dav/ diff --git a/doc/troubleshooting.rst b/doc/troubleshooting.rst index e7320f1b1..bdafba18f 100644 --- a/doc/troubleshooting.rst +++ b/doc/troubleshooting.rst @@ -34,7 +34,7 @@ Identifying Basic Functionality Problems For example, if your Nextcloud instance is installed at ``http://yourserver.com/nextcloud``, your WebDAV server address is - ``http://yourserver.com/nextcloud/remote.php/webdav``. + ``http://yourserver.com/nextcloud/remote.php/dav``. If you are prompted for your username and password but, after providing the correct credentials, authentication fails, please ensure that your diff --git a/man/nextcloudcmd.1.rst b/man/nextcloudcmd.1.rst index d718dae54..84a95a65c 100644 --- a/man/nextcloudcmd.1.rst +++ b/man/nextcloudcmd.1.rst @@ -76,7 +76,7 @@ the command line would be:: $ nextcloudcmd —httpproxy http://192.168.178.1:8080 \ $HOME/media/music \ - https://server/nextcloud/remote.php/webdav/Music + https://server/nextcloud/remote.php/dav/Music ``nextcloudcmd`` will enquire user name and password, unless they have been specified on the command line or ``-n`` (see `netrc(5)`) has been passed. @@ -85,7 +85,7 @@ Using the legacy scheme, it would be:: $ nextcloudcmd —httpproxy http://192.168.178.1:8080 \ $HOME/media/music \ - nextclouds://server/nextcloud/remote.php/webdav/Music + nextclouds://server/nextcloud/remote.php/dav/Music BUGS diff --git a/src/gui/owncloudsetupwizard.cpp b/src/gui/owncloudsetupwizard.cpp index b28df19de..2972f0b11 100644 --- a/src/gui/owncloudsetupwizard.cpp +++ b/src/gui/owncloudsetupwizard.cpp @@ -465,7 +465,7 @@ void OwncloudSetupWizard::slotCreateLocalAndRemoteFolders(const QString &localFo * * Purpose: Don't rely on unsafe paths, be extra careful. * - * Example: https://cloud.example.com/remote.php/webdav// + * Example: https://cloud.example.com/remote.php/dav// * */ qCInfo(lcWizard) << "Sanitize got URL path:" << QString(_ocWizard->account()->url().toString() + '/' + _ocWizard->account()->davPath() + remoteFolder); diff --git a/src/libsync/networkjobs.cpp b/src/libsync/networkjobs.cpp index 65b1b5474..763367988 100644 --- a/src/libsync/networkjobs.cpp +++ b/src/libsync/networkjobs.cpp @@ -403,7 +403,7 @@ bool LsColJob::finished() connect(&parser, &LsColXMLParser::finishedWithoutError, this, &LsColJob::finishedWithoutError); - QString expectedPath = reply()->request().url().path(); // something like "/owncloud/remote.php/webdav/folder" + QString expectedPath = reply()->request().url().path(); // something like "/owncloud/remote.php/dav/folder" if (!parser.parse(reply()->readAll(), &_folderInfos, expectedPath)) { // XML parse error emit finishedWithError(reply()); diff --git a/src/libsync/theme.cpp b/src/libsync/theme.cpp index 8729ec0a9..c14b315fe 100644 --- a/src/libsync/theme.cpp +++ b/src/libsync/theme.cpp @@ -645,7 +645,7 @@ bool Theme::wizardSelectiveSyncDefaultNothing() const QString Theme::webDavPath() const { - return QLatin1String("remote.php/webdav/"); + return QLatin1String("remote.php/dav/"); } QString Theme::webDavPathNonShib() const diff --git a/src/libsync/theme.h b/src/libsync/theme.h index 4e12c24cc..4c1dd113f 100644 --- a/src/libsync/theme.h +++ b/src/libsync/theme.h @@ -341,7 +341,7 @@ public: * Alternative path on the server that provides access to the webdav capabilities * * Attention: Make sure that this string does NOT have a leading slash and that - * it has a trailing slash, for example "remote.php/webdav/". + * it has a trailing slash, for example "remote.php/dav/". */ virtual QString webDavPath() const; virtual QString webDavPathNonShib() const; diff --git a/test/syncenginetestutils.h b/test/syncenginetestutils.h index 3b0e36e2a..2c2051eec 100644 --- a/test/syncenginetestutils.h +++ b/test/syncenginetestutils.h @@ -34,18 +34,19 @@ */ -static const QUrl sRootUrl("owncloud://somehost/owncloud/remote.php/webdav/"); +static const QUrl sRootUrl("owncloud://somehost/owncloud/remote.php/dav/"); static const QUrl sRootUrl2("owncloud://somehost/owncloud/remote.php/dav/files/admin/"); static const QUrl sUploadUrl("owncloud://somehost/owncloud/remote.php/dav/uploads/admin/"); -inline QString getFilePathFromUrl(const QUrl &url) { +inline QString getFilePathFromUrl(const QUrl &url) +{ QString path = url.path(); - if (path.startsWith(sRootUrl.path())) - return path.mid(sRootUrl.path().length()); if (path.startsWith(sRootUrl2.path())) return path.mid(sRootUrl2.path().length()); if (path.startsWith(sUploadUrl.path())) return path.mid(sUploadUrl.path().length()); + if (path.startsWith(sRootUrl.path())) + return path.mid(sRootUrl.path().length()); return {}; } diff --git a/test/testallfilesdeleted.cpp b/test/testallfilesdeleted.cpp index 3536bdadd..c3436cecd 100644 --- a/test/testallfilesdeleted.cpp +++ b/test/testallfilesdeleted.cpp @@ -214,7 +214,7 @@ private slots: if (verb == "PROPFIND") { auto data = stream->readAll(); if (data.contains("data-fingerprint")) { - if (request.url().path().endsWith("webdav/")) + if (request.url().path().endsWith("dav/")) ++fingerprintRequests; else fingerprintRequests = -10000; // fingerprint queried on incorrect path diff --git a/test/testremotediscovery.cpp b/test/testremotediscovery.cpp index 3bcf4b3a8..4e92ca744 100644 --- a/test/testremotediscovery.cpp +++ b/test/testremotediscovery.cpp @@ -91,7 +91,7 @@ private slots: auto oldLocalState = fakeFolder.currentLocalState(); auto oldRemoteState = fakeFolder.currentRemoteState(); - QString errorFolder = "webdav/B"; + QString errorFolder = "dav/B"; QString fatalErrorPrefix = "Server replied with an error while reading directory 'B' : "; fakeFolder.setServerOverride([&](QNetworkAccessManager::Operation op, const QNetworkRequest &req, QIODevice *) -> QNetworkReply *{ @@ -133,7 +133,7 @@ private slots: // // Check the same discovery error on the sync root // - errorFolder = "webdav/"; + errorFolder = "dav/"; fatalErrorPrefix = "Server replied with an error while reading directory '' : "; errorSpy.clear(); QVERIFY(!fakeFolder.syncOnce()); diff --git a/test/testxmlparse.cpp b/test/testxmlparse.cpp index f246a3a4c..201c3a449 100644 --- a/test/testxmlparse.cpp +++ b/test/testxmlparse.cpp @@ -53,7 +53,7 @@ private slots: const QByteArray testXml = "" "" "" - "/oc/remote.php/webdav/sharefolder/" + "/oc/remote.php/dav/sharefolder/" "" "" "00004213ocobzus5kn6s" @@ -77,7 +77,7 @@ private slots: "" "" "" - "/oc/remote.php/webdav/sharefolder/quitte.pdf" + "/oc/remote.php/dav/sharefolder/quitte.pdf" "" "" "00004215ocobzus5kn6s" @@ -110,16 +110,16 @@ private slots: this, SLOT(slotFinishedSuccessfully()) ); QHash sizes; - QVERIFY(parser.parse( testXml, &sizes, "/oc/remote.php/webdav/sharefolder" )); + QVERIFY(parser.parse( testXml, &sizes, "/oc/remote.php/dav/sharefolder" )); QVERIFY(_success); QCOMPARE(sizes.size(), 1 ); // Quota info in the XML - QVERIFY(_items.contains("/oc/remote.php/webdav/sharefolder/quitte.pdf")); - QVERIFY(_items.contains("/oc/remote.php/webdav/sharefolder")); + QVERIFY(_items.contains("/oc/remote.php/dav/sharefolder/quitte.pdf")); + QVERIFY(_items.contains("/oc/remote.php/dav/sharefolder")); QVERIFY(_items.size() == 2 ); - QVERIFY(_subdirs.contains("/oc/remote.php/webdav/sharefolder/")); + QVERIFY(_subdirs.contains("/oc/remote.php/dav/sharefolder/")); QVERIFY(_subdirs.size() == 1); } @@ -127,7 +127,7 @@ private slots: const QByteArray testXml = "X" "" "" - "/oc/remote.php/webdav/sharefolder/" + "/oc/remote.php/dav/sharefolder/" "" "" "00004213ocobzus5kn6s" @@ -151,7 +151,7 @@ private slots: "" "" "" - "/oc/remote.php/webdav/sharefolder/quitte.pdf" + "/oc/remote.php/dav/sharefolder/quitte.pdf" "" "" "00004215ocobzus5kn6s" @@ -184,7 +184,7 @@ private slots: this, SLOT(slotFinishedSuccessfully()) ); QHash sizes; - QVERIFY(false == parser.parse( testXml, &sizes, "/oc/remote.php/webdav/sharefolder" )); // verify false + QVERIFY(false == parser.parse( testXml, &sizes, "/oc/remote.php/dav/sharefolder" )); // verify false QVERIFY(!_success); QVERIFY(sizes.size() == 0 ); // No quota info in the XML @@ -207,7 +207,7 @@ private slots: this, SLOT(slotFinishedSuccessfully()) ); QHash sizes; - QVERIFY(false == parser.parse( testXml, &sizes, "/oc/remote.php/webdav/sharefolder" )); // verify false + QVERIFY(false == parser.parse( testXml, &sizes, "/oc/remote.php/dav/sharefolder" )); // verify false QVERIFY(!_success); QVERIFY(sizes.size() == 0 ); // No quota info in the XML @@ -229,7 +229,7 @@ private slots: this, SLOT(slotFinishedSuccessfully()) ); QHash sizes; - QVERIFY(false == parser.parse( testXml, &sizes, "/oc/remote.php/webdav/sharefolder" )); // verify false + QVERIFY(false == parser.parse( testXml, &sizes, "/oc/remote.php/dav/sharefolder" )); // verify false QVERIFY(!_success); QVERIFY(sizes.size() == 0 ); // No quota info in the XML @@ -242,7 +242,7 @@ private slots: const QByteArray testXml = "" "" "" - "/oc/remote.php/webdav/sharefolder/" + "/oc/remote.php/dav/sharefolder/" "" "" "00004213ocobzus5kn6s" @@ -268,7 +268,7 @@ private slots: this, SLOT(slotFinishedSuccessfully()) ); QHash sizes; - QVERIFY(!parser.parse( testXml, &sizes, "/oc/remote.php/webdav/sharefolder" )); + QVERIFY(!parser.parse( testXml, &sizes, "/oc/remote.php/dav/sharefolder" )); QVERIFY(!_success); } @@ -276,7 +276,7 @@ private slots: const QByteArray testXml = "" "" "" - "http://127.0.0.1:81/oc/remote.php/webdav/sharefolder/" + "http://127.0.0.1:81/oc/remote.php/dav/sharefolder/" "" "" "00004213ocobzus5kn6s" @@ -300,7 +300,7 @@ private slots: "" "" "" - "http://127.0.0.1:81/oc/remote.php/webdav/sharefolder/quitte.pdf" + "http://127.0.0.1:81/oc/remote.php/dav/sharefolder/quitte.pdf" "" "" "00004215ocobzus5kn6s" @@ -333,7 +333,7 @@ private slots: this, SLOT(slotFinishedSuccessfully()) ); QHash sizes; - QVERIFY(false == parser.parse( testXml, &sizes, "/oc/remote.php/webdav/sharefolder" )); + QVERIFY(false == parser.parse( testXml, &sizes, "/oc/remote.php/dav/sharefolder" )); QVERIFY(!_success); } @@ -398,7 +398,7 @@ private slots: this, SLOT(slotFinishedSuccessfully()) ); QHash sizes; - QVERIFY(false == parser.parse( testXml, &sizes, "/oc/remote.php/webdav/sharefolder" )); + QVERIFY(false == parser.parse( testXml, &sizes, "/oc/remote.php/dav/sharefolder" )); QVERIFY(!_success); } @@ -406,7 +406,7 @@ private slots: const QByteArray testXml = "" "" "" - "/oc/remote.php/webdav/sharefolder/" + "/oc/remote.php/dav/sharefolder/" "" "" "00004213ocobzus5kn6s" @@ -430,7 +430,7 @@ private slots: "" "" "" - "/oc/remote.php/webdav/sharefolder/../sharefolder/quitte.pdf" + "/oc/remote.php/dav/sharefolder/../sharefolder/quitte.pdf" "" "" "00004215ocobzus5kn6s" @@ -463,16 +463,16 @@ private slots: this, SLOT(slotFinishedSuccessfully()) ); QHash sizes; - QVERIFY(parser.parse( testXml, &sizes, "/oc/remote.php/webdav/sharefolder" )); + QVERIFY(parser.parse( testXml, &sizes, "/oc/remote.php/dav/sharefolder" )); QVERIFY(_success); QCOMPARE(sizes.size(), 1 ); // Quota info in the XML - QVERIFY(_items.contains("/oc/remote.php/webdav/sharefolder/quitte.pdf")); - QVERIFY(_items.contains("/oc/remote.php/webdav/sharefolder")); + QVERIFY(_items.contains("/oc/remote.php/dav/sharefolder/quitte.pdf")); + QVERIFY(_items.contains("/oc/remote.php/dav/sharefolder")); QVERIFY(_items.size() == 2 ); - QVERIFY(_subdirs.contains("/oc/remote.php/webdav/sharefolder/")); + QVERIFY(_subdirs.contains("/oc/remote.php/dav/sharefolder/")); QVERIFY(_subdirs.size() == 1); } @@ -480,7 +480,7 @@ private slots: const QByteArray testXml = "" "" "" - "/oc/remote.php/webdav/sharefolder/" + "/oc/remote.php/dav/sharefolder/" "" "" "00004213ocobzus5kn6s" @@ -504,7 +504,7 @@ private slots: "" "" "" - "/oc/remote.php/webdav/sharefolder/../quitte.pdf" + "/oc/remote.php/dav/sharefolder/../quitte.pdf" "" "" "00004215ocobzus5kn6s" @@ -537,7 +537,7 @@ private slots: this, SLOT(slotFinishedSuccessfully()) ); QHash sizes; - QVERIFY(!parser.parse( testXml, &sizes, "/oc/remote.php/webdav/sharefolder" )); + QVERIFY(!parser.parse( testXml, &sizes, "/oc/remote.php/dav/sharefolder" )); QVERIFY(!_success); }